Table des matières

Overview of key points for using Sunfluidh

Click here to come back to user's guide contents

Click here to go to the data-set page (input file)

This page summarizes some key points for using the code Sunfluidh in order to better understand the use of Sunfluidh.


Computational domain


The computational domain is the discrete space where equations are solved for flows simulations. It is defined with the namelist “ Domain_Features ”. This namelist contains every data to set up the domain size, the meshsize (the number of cells per direction) and the grid type (regular or not regular). If the grid is regular, every cells have the same size along a given direction. In this case, Sunfluidh builds directly the grid. If the grid is non regular, you should generate speficic files with the mesh generator MESHGEN. These specific files are read by Sunfluidh at the beginning of the computation.


Staggered grid


The spatial discretization of equations is carried out on a staggered grid :


Ghost-cells


The code uses ghost-cells at the domain's ends in order to handle the boundary conditions. These ghost-cells are placed around the computational domain, which is plotted with red lines in the next figure.

The grid size over the computational domain, which is set in the input data file, is enhanced by two in each direction (for example, a 2D grid size $64 \times 64$ over the computational domain becomes $66 \times 66$ in the code).

Boundary conditions


This part is particularly delicate. Please, spend time to read the three sub-sections just below about the boundary conditions and pay attention to the different examples proposed.

At the domain's ends

By default, the computational domain is an enclosed cavity : the domain ends are walls. New boundary conditions can be defined in the data file in place of the default ones by means of the namelists :

The inlet/outlet boundary conditions overwrite the default wall conditions only on areas defined by the user. Domain ends can be therefore defined from several types of boundary conditions (inlet/wall, outlet/wall, … see here for some examples.
The “border” boundary conditions overwrite the whole specified domain end.

Wall boundary conditions can be specified for different physical quantities with the following namelist :

If you do not specify any wall boundary conditions or “border” boundary conditions in the input data file, Sunfluidh assumes default boundary conditions which are :

Immersed bodies

Immersed bodies can be placed in the computational domain in order to build more complex flow geometries. Several geometries are available :

These data setup can be used in 2D and 3D configurations.

When walls of bodies are aligned with the cartesian grid (e.g. for rectangle or cube), you must pay attention to the cell faces match the walls in order to ensure a perfect accuracy on the location of the body.

Linking wall boundary conditions with immersed bodies and walls of the domain ends

You can build different sets of wall boundary conditions for the velocity components and temperature from the namelists previously named (Velocity_Wall_Boundary_Condition_Setup, Heat_Wall_Boundary_Condition_Setup). Each set must be tagged by means of the indentifier “Wall_BC_DataSetName”:

The namelists of immersed bodies also get an indentifier “Wall_BC_DataSetName” which can be named with the tag corresponding to the appropriate wall boundary conditions.

  • By default, the wall boundary condition “Set1” is always applied at the walls placed at the domain ends (if they exists).
  • The wall boundary condition “Set1” can be also used for a immersed body.
  • A set of wall boundary conditions can be used for several immersed bodies

For a better understanding on the boundary conditions, an example is provided here that belongs to the tutorial Tutorial : How to build the input data file


Fluid properties


The fluid properties are defined with the namelist Fluid_Properties .
It is not mandatory to set up all the data of the namelist. Only the data of interest must be considered, the other ones can be ignored.

By default the fluid is incompressible.

You find here some examples :
For an incompressible fluid without heat transfer

 &Fluid_Properties  Reference_Density= 1.0 , Reference_Dynamic_Viscosity = 3.D-03 /

For an incompressible fluid with heat transfer

 &Fluid_Properties  Heat_Transfer_Flow = .true.     ,  Reference_Density= 1.0,
                    Reference_Temperature= 1.0      ,  Reference_Dynamic_Viscosity= 0.71D-02  ,
                    Reference_Heat_Capacity= 1.0.   ,
                    Prandtl = 0.71                  ,  Thermal_Expansion_Coefficient= 1.0 /
  • For problems with heat transfer, the heat capacity is supposed uniform and constant (except for multi-species flows, it can depend on temperature and species mass fractions).
  • The thermal diffusivity is computed by the code from the reference values of density, dynamic viscosity and Prandtl number : $\kappa_0= \frac{\mu_0}{\rho_0 Pr}$.
  • The thermal conductivity is computed by the code from the reference values of heat capacity, dynamic viscosity and Prandtl number : $\lambda_0= \frac{\mu_0.Cp_0}{Pr}$.
  • The temperature dependance of the dynamic viscosity, thermal diffusivity and thermal conductivity can be taken into account with the Sutherland's law (add the variable Sutherland_Law_Enabled=.true.)
    $\mu= \mu_0(T_0).S(T)$ ; $\kappa= \kappa_0(T_0).S(T)$ ; $\lambda= \lambda_0(T_0).S(T)$
    where $T_0$ is the reference value of the temperature (Reference_Temperature)
    The Sutherland's law reads: $$S(T)=\frac{T^{1.5}.C_1}{T+C_2}$$
    where $C_1$ and $C_2$ are parameters which depend on reference pressure (the atmospheric pressure) and reference temperature ($T_0$).
  • The data “Thermal_Expansion_Coefficient” is related to the buoyancy effect which is activated with the namelist “ Gravity ”. Please, read attentively the documentation related to the gravitational force ( Gravity ) because the data setting depends on the problem treated.

Field's initialization procedure


The initialization procedure relies on specific namelists :

These namelists propose several ways for initializing the fields of velocity, temperature, species mass fractions, etc …

The initial density field is generally uniform except for the two-phase flows and sometimes for the multi-species flows.

Numerical time step


The data set up that refers to the time step is in the namelist Simulation_Management. Two ways are possible :

When the user wants to acquire results with an accurate time recording rate, he should use an imposed time step. When the user wants to record time series from probes in order perform FFT, it is also strongly advised to use an imposed time step.

Results


Sunfluidh can provides various results of simulation :

Information on these results is provided on the page "Sunfluidh output files".


Stopping criteria


Three possibilities exist for stopping the simulation by means of data present in the namelist Simulation_Management :

The first criterion statisfied among the three ones stops the simulation.