The ALE module may be activated through the Graphical User Interface (GUI) in the Calculation features section. It can also be activated in the cs_user_model function in cs_user_parameters.c. See ALE activation for examples.
When activated in the GUI, a Deformable mesh page appears in the GUI, Providing additional options. The user must choose the type of mesh viscosity and describe its spatial distribution, see Ini-ale.
The options may also be set and completed with the usstr1 function found in cs_user_fluid_structure_interaction.f90. It is possible to specify informations for the structure module, such as the index of the structure (idfstr), and the initial displacement, velocity and acceleration values (xstr0, xstreq and vstr0). For examples, see examples.
These boundary conditions can be managed through the GUI, or using the cs_user_boundary_conditions_ale function in cs_user_boundary_conditions.c file.
With the GUI, when the item Deformable mesh is selected in Calculation features, specific boundary condition types for the mobile mesh may be defined for each zone. The user can choose a boundary condition type for ALE (internal coupling), including displacements based on a mass-spring model, such as CL-ale1.
When at least one boundary is of the "internal coupling" (mass-spring model) type, a Coupling parameters entry appears under the one for Boundary conditions.
Instead of or in addition to settings with the GUI, the cs_user_boundary_conditions_ale fonction may be used with the ALE module. It is used in a similar way to the cs_user_boundary_conditions in the framework of standard calculations, that is to say array values are defined for each face to specify the detailed mesh boundary conditions. See Examples of boundary conditions for ALE.
With the ALE module, the cs_user_physical_properties user-defined function allows modifying the mesh viscosity. It is first called before the time loop, and before reading restart files (so the mesh is always in its initial position at this stage). The user can modify mesh viscosity values to prevent cells and nodes from huge displacements in awkward areas, such as boundary layer for example.
Note that for more complex settings, the mesh viscosity could be modified in cs_user_initialization or cs_user_extra_operations. The matching field's name is mesh_viscosity.
In the file cs_user_fluid_structure_interaction.f90 the user provides the parameters of two functions.