Phases

In the phases section the material parameters are defined for different SPH components.

The name of the phases as given/used in SimLab is not important, only the material ID in SimLab that relates to the phase number as defined here. The first phase definition in the configuration file defines the properties of the SPH particles with the material ID “1”, the second group for the material ID “2”, and so on.

For more information, refer to Solver Features in the Theory Manual.

Commands

phases
{
    phase
    {
         name                       Water
         type                       FLUID
         rho_0                      1000.
         dyn_visc                   1.e-3
         surf_ten                   0.1
         temp_0                     0.
         heat_cond                  0.
         heat_cap                   0.
         evolve_temp                false
         rho_compr                  0.01
         pc_factor                  1.0
         print_info                 false
         print_phase                true
         cs                         100     
         rm_rho_theta               1.1
         init_vel                   “0.0 0.0 0.0”
    }
    phase
    {
         name                       Housing
         type                       WALL				
         heat_cond                  0.0
         heat_cap                   0.0
         temp_0                     0.0
         evolve_temp                false
         noSlip                     true
         print_info                 true
         print_phase                true
         adhesionCoeff              0.01            
         contact_angle              90.0
         fluidContactPhase          1      
         makesubphase               true
         init_vel                   “0.0 0.0 0.0”
    }
    phase
    {
         name                        Something_moving
         type                        MOVINGWALL
         rho_0                       1.0
         heat_cond                   0.0
         heat_cap                    0.0
         temp_0                      0.0
         evolve_temp                 false	
         noSlip                      true
         print_info                  true
         print_phase                 true	
         adhesionCoeff               0.01    
         contact_angle               90.0        
         fluidContactPhase           1   
         makesubphase                true   
         init_vel                    “0.0 0.0 0.0”
    }
    …
}

Definitions

Command Contents SI Unit Example
name The name of this phase.
Note: This does not need to match the component name in SimLab.
Options
  • This can be any string value like “water” or “mixedfluid”.
type The type of the phase defines the physical behavior.
Attention: This property is mandatory.
Options
  • FLUID: The forces acting on these particles define the motion according to the Navier-Stokes equation.
  • WALL: These particles do not change their position during the entire simulation as they define a static rigid wall boundary. They have a no-slip boundary condition associated at the FLUID-WALL interface, which can be overridden by the noSlip command.
  • MOVINGWALL: These particles can change their position based on how their motion is defined, unless specified as a rigid body. A MOVINGWALL can move according to an imposed velocity or imposed rotation (see Motions). They also have a no-slip boundary condition associated at the FLUID-MOVINGWALL interface. If the MOVINGWALL is designated as a rigid body (see fluidCoupledMotion), then it interacts freely with the fluid and is subject to buoyancy forces, and so on. For example, ships and similar floating objects can be simulated as rigid bodies.
rho_0 The reference density of this phase. This is the initial density of all particles of this phase.
Warning: In case that the body is defined as rigid (fluidCoupledMotion), this value is overridden by a density which is calculated based on the specified mass of the body (body_mass) and the total number of particles representing the phase in question.

Default = 1.0

dyn_visc The dynamic viscosity of this phase in [kg / (m s), Pa s].
Warning: If viscTempCoupling (temperature-viscosity coupling) is set to true, this value will be ignored since it is specifically defined by temperature-viscosity models which determine the viscosity of the fluid.
Note: For more information, refer to Viscosity Models.

Default = 0.0

heat_cap The specific heat capacity at constant pressure (Cp) of this phase.
Related Commands
  • energy_transport
  • heat_cond
  • evolve_temp
  • temp_0
  • Energy equation

Default = 0.0

[J/kg/K]
heat_cond The heat conductivity of this phase.
Related Commands
  • energy_transport
  • heat_cap
  • evolve_temp
  • temp_0
  • Energy equation

Default = 0.0

[W/m/K]
evolve_temp This flag can be used to set the temperature of a phase constant, or to allow it to evolve using the energy equation.
Options
  • true
  • false
Related Commands
  • energy_transport
  • heat_cap
  • heat_cond
  • temp_0
  • Energy equation

Default = false

noSlip Switch to enable the WALL or MOVINGWALL to become a slip or no-slip boundary condition.
Options
  • true
  • false

Default = true

temp_0 The initial temperature of a phase in Kelvin [K].
Related Commands
  • energy_transport
  • heat_cap
  • heat_cond
  • evolve_temp
  • Energy equation

Default = 273.15

surf_ten The surface tension coefficient [N/m].
Note:
  • For the ADAMI surface tension model, this needs to be the physical value of the surface tension coefficient. For lubricating oil, the common oil-air surface tension value is 0.03 N/m.
  • If using the SINGLE_PHASE surface tension model, this value needs to be fine-tuned to suit a particular case. Good start is value of 0.1 N/m.
Related Commands
  • surften_model
  • ref_curv
  • Multiphase surface tension

Default = 0.0

rho_compr The compressibility of the fluid.
Note: Following the weakly compressible approach, the admissible density variation is 1 percent. For example, rho_compr = 0.01.
CAUTION: Changing this value without an advanced understanding could have undesired consequences.

Default = 0.01

pc_factor Background correction pressure associated with the transport velocity formulation. It can have an arbitrary value, however it is generally recommended to keep it on the same order of magnitude of the p0 (base pressure).
Related Commands
  • Transport velocity formulation

Default = 1.0

print_info If this Boolean flag is set to true, an additional file is written during the simulation with the filename name_info.txt (name is the phase name as defined earlier). The content is written every #N steps (see dt_phaseinfo) and contains information on for example the forces, torques, kinetic energy and center-of-mass of this phase.
Options
  • true
  • false

Default = false

print_phase This Boolean flag switches the output of this phase on or off. This switch is useful to limit the amount of output since wall particles, for example, do not change their position in time and might not be necessary in the output.
Options
  • true
  • false

Default = false

cs Specify the speed of sound in the FLUID phases (individually).
Note: By default, this parameter is left out of the phase definition in which case the code will use the automatically calculated speed of sound based on the ref_vel and rho_compr. Speed of sound can have a profound influence on the overall behavior of the simulation and is generally considered an advanced parameter.
CAUTION: Defining this value without an advanced understanding could have undesired consequences.
rm_rho_theta Scaling parameter designed to enable local particle density reinitialization once the threshold of rho_0*rm_rho_theta is exceeded.
Restriction: This parameter is only available and meaningful when Riemann scheme is used.
Tip: Suggested best practices maintain the stability of the Riemann formulation in multiphase simulations.
  • For high density fluids, such as water or oil, best practice is to keep the value very high. For example, 1e7. Basically meaning that heavy fluids never undergo local density reinitialization.
  • For low density fluids it is suggested to keep this value low. For example, between 1.1 and 1.2.
rm_beta Numerical parameter used in the low-dissipation Riemann solver. It determines the level of numerical dissipation being introduced in the pair-wise interactions.
Tip:
  • Setting this value to -1 allows for reverting the low-dissipation Riemann solver to a linearized Riemann solver. This increases the overall amount of numerical dissipation used and can be enabled on a phase basis.
  • If the specified phase is a fluid, then the linearized Riemann solver will be applied with particle interaction within the phase. If the specified phase is not a fluid, then any fluid particles that are interacting with this phase will be switched to linearized Riemann solver. This modification essentially increases numerical dissipation so that the stability of inter-phase behavior is improved.
Default = 3.0
Tip: Reducing this value increases the amount of dissipation. The value of 3.0 is adopted from academic sources.
CAUTION: Changing this value without an advanced understanding could have undesired consequences.
adhesionCoeff Scalar value that determines the strength of adhesion force of the fluid particles to the material. Tested range goes from 0.001 to 2.0.
Note: This is a numerical parameter, so it does not have its physical counterpart defined.

Default = 0.0

contact_angle This is the contact angle in degrees as seen from the fluid phase.
Warning:
  • Used only for the TARTAKOVSKY2016_F1 surface tension model when only a single fluid phase is simulated.
  • Must be a value between 0.0 and 180.0.

Default = 90.0

Tip: For more information, refer to Contact Angle.
fluidContactPhase Use this command in the phase definition to track the amount of time the WALL or MOVINGWALL phase spends in contact with the specified fluid phase. The time data is written in the respective particle output file.
Attention: This command is only valid for WALL and MOVINGWALL type phases, whereas the tracked phase can only be a FLUID.
makesubphase Setting this value to true enables more efficient treatment of the phases when executing the main GPU calculations. The performance gain increases as the number of the phases in the case increases.
Tip:
  • It is recommended to use this capability whenever possible.
  • For more information, refer to the Theory Manual.

Default = true

init_vel This command can be applied to all phase types.
Attention:
  • If this command is applied to a FLUID phase type, it assigns an initial velocity to the specified FLUID phase.
  • If this command is applied to a WALL or a MOVINGWALL phase type, it will assign the specified velocity vector to all the particles belonging to that phase. In effect this will behave as a velocity boundary condition on the specified phase.
Warning: Assigning velocity boundary condition via init_vel will be removed in future version of nanoFluidX.

Default = “0.0 0.0 0.0”