.. _non_dim_tutorial: Non-Dimensionalization and Integrated Loads Post-Processing in Flow360 ======================================================================= Introduction ------------ The main purpose of this tutorial is to provide a hands-on example for :ref:`nondimensional inputs ` and :ref:`outputs ` in Flow360. The tutorial includes running CFD cases with different :math:`L_{gridUnit}` values, showing how the different mesh scaling affects the output and how to convert the output to dimensional values. Additionally conventions with respect to forces in body/stability axes are also presented. Three different cases are used for this tutorial: - the CRM wing-body used during the `7th Drag Prediction Workshop `_ - the XV-15 rotor blade using a time-accurate solution - the XV-15 rotor blade using a blade element theory (BET) disk solution .. note:: Any value presented here in symbolic format (for example :math:`A_{ref}`) refers to a dimensional value, whereas any value written in code format (for example :code:`geometry->refArea`) refers to a nondimensional value that is an input to the Flow360.json file. Flow360 json file input calculations ------------------------------------ Firstly, the Flow360 json file input calculations are demonstrated for three different cases using different :math:`L_{gridUnit}` values. The :math:`L_{gridUnit}` value is defined as the physical length represented by unit length in the given mesh file. Since the Flow360 solver is nondimensional, the :math:`L_{gridUnit}` value is used to scale all length inputs. This allows the user to construct a mesh in any desired unit. Typical units are: meters, millimeters, feet, inches or reference chord lengths. However, care must be taken when calculating input values such as Reynolds number or rotational speed, omega, to ensure that the same solution is obtained across different mesh scales. The :math:`L_{gridUnit}` values for commonly used mesh units are shown in :numref:`tab_Lgridunit` .. _tab_Lgridunit: .. csv-table:: :math:`L_{gridUnit}` values for commonly used mesh units. :file: Tables/LgridUnit.csv :widths: 10,50 :header-rows: 1 :delim: @ Typically for CFD studies, the user will either be given a Reynolds number directly from experimental data, or the value will have to be calculated. The Reynolds number can be calculated using the following equation, with the :math:`L_\text{ref}` taking the value of the experimental reference legnth in grid units and :math:`L_{gridUnit}` value taken from the table above. The experimental Reynolds number can be obtained using `the following calculator `_ .. math:: :label: ReynoldsLgridUnit Re_\text{CFD} = \frac{\rho_\infty U_\text{ref} \text{L}_\text{gridUnit}}{\mu_\infty} = Re_\text{EXP} \cdot \frac{{L}_\text{gridUnit}}{\text{L}_\text{ref}} CRM Wing-Body ^^^^^^^^^^^^^ The CRM Wing-Body configuration has been used for the `7th Drag Prediction Workshop `_. The nominal flow conditions quoted on the `7th Drag Prediction Workshop website `_ are a freestream Mach number of 0.85 and Reynolds number of :math:`20 \times 10^6` based on the mean aerodynamic chord (MAC) of 275.8 inches (7.00532 meters). For this tutorial the CRM is simulated at an angle of attack of 3 degrees using the tiny grid from JAXA available `here `__ along with the `Flow360Mesh.json `_ file also available. Grids of other resolutions are available `here `__. The simulated grid is scaled to a unit chord of 1.0. To demonstrate the nondimensionalization conventions in Flow360, the CRM is scaled to five different grid units as shown in :numref:`Fig2_CRM_Scale`. .. _Fig2_CRM_Scale: .. figure:: Figures/CRM_MAC.png :align: center :scale: 80% CRM geometry scaled to different geometry and mesh units The calculation of the :ref:`required inputs for the Flow360 json file `, including the Reynolds number (using :eq:`ReynoldsLgridUnit`), Flow360.json reference length (:code:`geometry->momentLength`) and area (:code:`geometry->refArea`) as well as the Mach number is presented in :numref:`tab_InputsCRM`. The Flow360.json reference length is the nondimensional CRM wing MAC whereas the reference area is the nondimensional CRM wing area, with the dimensional values available `here `__ .. _tab_InputsCRM: .. csv-table:: Solver inputs nondimensionalization for the CRM wing-body. :file: Tables/non_dimensionalization_CRM_inputs.csv :widths: 4, 20, 20, 20, 20, 20 :align: center :header-rows: 1 :delim: @ The CFD calculation Reynolds number depends on the units used in the mesh due to the presence of a length component in the Reynolds number definition as seen in :eq:`ReynoldsLgridUnit`. The Flow360.json reference length (:code:`geometry->momentLength`) and area (:code:`geometry->refArea`) can be any value but will typically be the wing MAC and wing area nondimensionalized by :math:`L_{gridUnit}` and :math:`L_{gridUnit}^2` respectively. These are used to output nondimensional force and moment coefficients. The Mach number is consistent between different mesh scales. If it is unknown then it can be calculated by :ref:`dividing the freestream inflow velocity with the freestream speed of sound `. An example `Flow360.json `__ file is available with the mesh scaled to a unit chord of 1.0. XV-15 Time-accurate and BET Disk ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The second example is the XV-15 rotor blade in both time-accurate and BET disk configurations. The reference data used in this example is available in :ref:`this paper `. Here the key parameters are the blade tip Mach number of 0.69, Reynolds number of :math:`4.95 \times 10^6` based on a reference chord of 14 inches (0.3556m). The rotor radius is also required for input data and is equal to 150 inches (3.81m). The main difference between the steady-wing case and a rotor case is the need to calculate the nondimensional rotational speed, omega, as well as the time step size for the time-accurate calculation. For this tutorial we simulate the XV-15 rotor blade in hover at a collective of 10 degrees. For the time-accurate simulation a coarse grid (and Flow360Mesh.json file) is used from the :ref:`time-accurate sliding interface XV-15 tutorial `, whereas the coarse grid (and Flow360Mesh.json file) from :ref:`blade element theory (BET) case study ` is used for the BET demonstration. The values used for meshes across five different units are shown in :numref:`Fig3_XV15_Scale`. .. _Fig3_XV15_Scale: .. figure:: Figures/XV15GridUnits.png :align: center :scale: 80% XV-15 geometry scaled to different geometry and mesh units The calculation of the required inputs for the Flow360 json file, including the Reynolds number, Flow360.json reference length (:code:`geometry->momentLength`) and area (:code:`geometry->refArea`) as well as the Mach number (:code:`Mach`) is presented in :numref:`tab_InputsXV15`. Here, the reference length (:code:`geometry->momentLength`) is the rotor radius nondimensionalized by the :math:`L_{gridUnit}`, whereas the reference area (:code:`geometry->refArea`) is the rotor disk area nondimensionalized by :math:`L_{gridUnit}^2` which is typical for rotor calculations. Additionally, calculations are also shown for the nondimensional omega and the time-step size equivalent to 1 degree of rotation per time step, following the :ref:`conventions of Flow360 `. The BET disk input explicitly requires the rotor radius as an input, whereas only the time-accurate simulation requires a time step input. To calculate the nondimensional omega the following equation is used: .. math:: :label: NondimensionalOmega \omega_\text{CFD} = \Omega_\text{DIM} \cdot \frac{\text{L}_\text{gridUnit}}{C_{\infty}} = \frac{U_\text{tip}}{R} \cdot \frac{\text{L}_\text{gridUnit}}{C_{\infty}} = \\ \frac{M_\text{tip}\cdot C_{\infty}}{R} \cdot \frac{\text{L}_\text{gridUnit}}{C_{\infty}}= \frac{M_\text{tip}}{R} \cdot \text{L}_\text{gridUnit} The time step is nondimensionalized using the :math:`L_{gridUnit}` value and freestream speed of sound. To obtain the time step for one degree of rotation, the rotor rotational speed is used as follows: .. math:: :label: NondimensionalTimestep t_\text{CFD} = t_\text{DIM} \text{(per degree)} \cdot \frac{C_{\infty}}{\text{L}_\text{gridUnit}} = \frac{2 \pi R}{U_\text{tip}} \cdot \frac{1}{360} \cdot \frac{C_{\infty}}{\text{L}_\text{gridUnit}} = \\ \frac{2 \pi R}{M_\text{tip} \cdot C_{\infty}} \cdot \frac{1}{360} \cdot \frac{C_{\infty}}{\text{L}_\text{gridUnit}} = \frac{R}{M_\text{tip}} \cdot \frac{1}{{\text{L}_\text{gridUnit}}} \cdot \frac{\pi}{180} = \frac{1}{\omega_\text{CFD}} \cdot \frac{\pi}{180} For the XV-15 example, once again the CFD Reynolds input depends on the mesh units. For rotor calculations, the dimensional rotor radius and rotor disk area are scaled by the :math:`L_{gridUnit}` and :math:`L_{gridUnit}^2` to obtain the nondimensional reference length (:code:`geometry->momentLength`) and area (:code:`geometry->refArea`) respectively. The input Mach number (:code:`Mach`) is the freestream Mach number and is zero in this case, but a reference blade tip Mach number (:code:`MachRef`) of 0.69 is used for scaling forces and moments. In this case, the nondimensional omega and time step size also depend on the mesh unit. For time marching rotor solutions, the simulation is typically initialized using a 1st order solution to establish the flowfield, and then continued using the 2nd order solver (see :ref:`Knowledge Base `). The `1st order initial solution Flow360.json `_ and `2nd order solution Flow360.json `__ files are available, with meters used as the mesh unit. For the BET simulation, an example `Flow360.json `_ file is also available, with inches used as the mesh unit. .. _tab_InputsXV15: .. csv-table:: Solver inputs nondimensionalization for the XV-15 rotor blade. :file: Tables/non_dimensionalization_XV15_inputs.csv :widths: 3, 20, 20, 20, 20, 20 :align: center :header-rows: 1 :delim: @ Force and Moments Output Conventions ------------------------------------ For the steady CRM wing-body and time-marching XV15 rotor calculations, the forces and moments are output in nondimensional coefficients independent of the mesh unit. The total forces for all non-slip walls present in the calculation are stored in total_forces_v2.csv, whereas the forces on the individual non-slip walls are stored in surface_forces_v2.csv. For the BET calculation, the forces are also given in nondimensional form, but their values are scaled differently and are dependent on the mesh units used. The forces are stored in bet_forces_v2.csv. Firstly, the forces convention is presented for the steady CRM wing-body case and time-marching XV-15 rotor case, and following, the conventions for the BET forces are presented in more detail. The typical output available in the WebUI and various csv files is outlined in :numref:`tab_ForcesMoments`. The conventions assume z-axis upwards, y-axis spanwise (+ towards starboard side) and x-axis in the axial direction (+ in the freestream direction) for the global axes, as shown in :numref:`axis_conventions` for the example of the CRM wing-body. For steady simulations, the body axes are typically aligned with the global axes. The :math:`\alpha` and :math:`\beta` angles are used for converting the forces in body axes to forces in stability axes are the angle of attack and sideslip angles which are input in the Flow360.json file. .. _axis_conventions: .. figure:: Figures/AxisConventions.png :align: center :scale: 80% Axis conventions demonstrated using the CRM geometry .. _tab_ForcesMoments: .. csv-table:: Force and Moment output conventions. :file: Tables/force_moments.csv :widths: 5, 20, 60 :align: center :header-rows: 1 :delim: @ The BET disk forces and moments are calculated based on the global coordinate system (inertial reference frame). The BET disk moments are based on the center of rotation and rotor radius of each BET disk. The nondimensional factors used for the forces and moments are explained in more detail in the following sections. CRM Wing-Body ^^^^^^^^^^^^^ For the CRM wing body, the output coefficient values are averaged over the last 10% steps (500 iterations). The output coefficient values are shown in :numref:`tab_CRM_output_coeffs`, with the pitching moment coefficient being equivalent to CMy in this case. The lift and pitching moment coefficients can be converted into dimensional units using the following equations: .. math:: :label: DimensionalLift L &= CL \cdot 0.5 \rho_\infty U_{ref}^2 A_{ref} = \\ &= CL \cdot 0.5 \rho_\infty \cdot M_\infty^2 C_\infty^2 \cdot \text{"geometry/refArea"} \cdot L_{gridUnit}^2 \\ M &= CM \cdot 0.5 \rho_\infty U_{ref}^2 A_{ref} L_{ref}= \\ &= CM \cdot 0.5 \rho_\infty \cdot M_\infty^2 C_\infty^2 \cdot \text{"geometry/refArea"} \cdot \text{"geometry/momentLength"} \cdot L_{gridUnit}^3 .. _tab_CRM_output_coeffs: .. csv-table:: Lift and pitching moment coefficients from the CRM wing-body simulation :file: Tables/CRM_coefficients.csv :widths: 5, 10 :align: center :header-rows: 1 :delim: @ An example of converting the lift and pitching moment coefficients (other forces and moments are equivalent) into dimensional units is shown in :numref:`tab_CRM_Dim_Forces` for a number of different mesh units following the equations above. .. _tab_CRM_Dim_Forces: .. csv-table:: Conversion from coefficient values to dimensional forces for the CRM wing-body :file: Tables/CRM_conversions.csv :widths: 5, 40, 40 :align: center :header-rows: 1 :delim: @ As can be seen from the example above, the coefficient values are independent of the mesh units used. When converting to dimensional forces, the product of the nondimensional reference area (:code:`geometry->refArea`) and :math:`L_{gridUnit}^2` is constant across different mesh units for the force conversion. For the moment conversion, the product of the nondimensional reference area (:code:`geometry->refArea`), nondimensional reference length (:code:`geometry->momentLength`) and :math:`L_{gridUnit}^3` is fixed. .. note:: When simulating a semi span airplane (like we have done above) the reference area must be properly set. If we want to get the forces on the whole aircraft from the semi span coefficients we should multiply the semi span refArea by 2. Time-marching XV-15 Rotor Blade ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The example of the time-marching XV-15 rotor blade is not significantly different from the CRM wing-body case. In this case, the forces and moments are typically averaged over a revolution or number of revolutions (2 revolutions used here). As the rotor is in hover with the z-axis pointing upwards, the CFz value represents the thrust coefficient, whereas the CMz value represents the torque coefficient (note a 0.5 is used here in the denominator which is according to UK conventions). The resulting thrust and torque coefficients (CFz and CMz) are shown in :numref:`tab_XV15_output_coeffs`. In this case, the rotor thrust and torque can be obtained using the following equations: .. math:: :label: DimensionalThrust T &= CFz \cdot 0.5 \rho_\infty U_{ref}^2 A_{ref} =\\ &= CFz \cdot 0.5 \rho_\infty \cdot M_\infty^2 C_\infty^2 \cdot \text{"geometry/refArea"} \cdot L_{gridUnit}^2\\ Q &= CMz \cdot 0.5 \rho_\infty U_{ref}^2 A_{ref} L_{ref} =\\ &= CMz \cdot 0.5 \rho_\infty \cdot M_\infty^2 C_\infty^2 \cdot \text{"geometry/refArea"} \cdot \text{"geometry/momentLength"} \cdot L_{gridUnit}^3 .. _tab_XV15_output_coeffs: .. csv-table:: Thrust and torque coefficients from the XV-15 rotor blade time-marching simulation :file: Tables/XV15_coefficients.csv :widths: 5, 10 :align: center :header-rows: 1 :delim: @ As mentioned previously, the primary difference between fixed-wing and rotor calculations, is the fact that for rotor calculations, the nondimensional reference area (:code:`geometry->refArea`) is typically taken as the rotor disk area scaled by :math:`L_{gridUnit}^2`, whereas the rotor radius scaled by :math:`L_{gridUnit}` is typically used as the nondimensional reference length (:code:`geometry->momentLength`). Here, since the freestream velocity is zero then the Mach is also zero. We thus use the blade tip Mach number as the reference Mach number. An example of obtaining the dimensional thrust and torque values for a number of units is shown in :numref:`tab_XV15_Dim_Forces`. Similarly as for the CRM wing-body example, the coefficient values are independent of the mesh units used. .. _tab_XV15_Dim_Forces: .. csv-table:: Conversion from coefficient values to dimensional forces for the XV-15 rotor blade time-marching simulation :file: Tables/XV15_conversions.csv :widths: 5, 40, 40 :align: center :header-rows: 1 :delim: @ .. _betdisk_xv15_nonDim_postprocess: BET Disk XV-15 Rotor Blade ^^^^^^^^^^^^^^^^^^^^^^^^^^ The conversion of the forces and moments from the BET Disks is slightly different as the values are independent of the reference area and length specified in the Flow360.json file. This means that the nondimensional force and moment outputs in bet_forces_v2.csv vary depending on the mesh unit used. The dimensional thrust and torque values can be obtained using the following equations (assuming the rotor disk is aligned with z-axis pointing upwards): .. math:: :label: BETForces T = Disk\_Force\_z \cdot \rho_\infty C_\infty^2 L_{gridUnit}^2\\ Q = Disk\_Moment\_z \cdot \rho_\infty C_\infty^2 L_{gridUnit}^3 The values obtained from the BET simulation using different mesh units for the Disk nondimensional z-force and moment about the z-axis are shown in :numref:`tab_XV15BET_output_coeffs` .. _tab_XV15BET_output_coeffs: .. csv-table:: nondimensional thrust and torque from the XV-15 rotor blade BET disk simulation. :file: Tables/XV15BET_coefficients.csv :widths: 5, 10, 10 :align: center :header-rows: 1 :delim: @ In this case, the nondimensional thrust and torque values vary with the mesh units used, however, all simulations lead to the same dimensional forces and moments. An example of obtaining the dimensional thrust and torque values for a number of units is shown in :numref:`tab_XV15BET_Dim_Forces`. .. _tab_XV15BET_Dim_Forces: .. csv-table:: Conversion from coefficient values to dimensional forces for the XV-15 rotor blade BET disk simulation :file: Tables/XV15BET_conversions.csv :widths: 5, 40, 40 :align: center :header-rows: 1 :delim: @ This completes the tutorial on nondimensionalization conventions in Flow360. A short note on the results can be made, comparing results between the XV-15 time-marching and BET disk simulations. The dimensional thrust shows good agreement, however, the BET disk simulation predicts a much lower torque than the time-marching simulation. This is primarily due to the fact that very coarse grids were used in these simulations, hence the boundary layer is not well resolved for the time-marching simulation. The main purpose of this tutorial was to demonstrate the different nondimensionalization conventions used in Flow360.