websights

Fill out the form to download

Required field
Required field
Not a valid email address
Required field
Required field
  • Set up your own cloud-native simulation in minutes.

  • Documentation

    Multi-purpose Analysis

    The Multi-purpose analysis type offers an automated robust meshing strategy producing hexahedral cells suitable for the underlying solver, thereby reducing mesh generation times by huge margins. Because the mesh has a high quality, it requires fewer cells to achieve the same level of accuracy. It offers faster convergence at the cost of a reduced feature set. Some highlights of the mesher are:

    • Body fitted Cartesian meshing
    • Cells suitable for finite volume discretization
    • Robust and quick meshing algorithm

    Multi-purpose is a Finite Volume-based CFD solver with segregated pressure-velocity coupling using a proprietary variant of the SIMPLE\(^1\) algorithm. It provides the possibility to simulate both incompressible and compressible flow, either laminar or turbulent in a single framework. Turbulence is modeled using the RANS equations with the k-epsilon turbulence model for closure and proprietary wall functions for near wall treatment.

    subsonic cartesian mesh
    Figure 1: CFD simulation over a centrifugal compressor with non-orthogonality and velocity contours displayed on a Cartesian Multi-purpose mesh.

    Multi-purpose supports steady-state as well as full transient analysis. In full transient analysis, the fluid flow is modeled in a time-accurate manner and any rotating component in the domain is solved using the sliding mesh approach.

    Within SimScale, one can effortlessly set up a Multi-purpose simulation that involves the following steps:

    Creating a Multi-purpose Analysis

    To create a Multi-purpose analysis, first, select the desired geometry and click on ‘Create Simulation’:

    create a multi-purpose simulation
    Figure 2: Steps to create a simulation in SimScale

    Next, a window with a list of several analysis types supported in SimScale will be displayed:

     analysis type page multipurpose
    Figure 3: Select Multi-purpose analysis type from the tree above and click on ‘Create Simulation’ at the bottom.

    Important

    Multi-purpose is a specialized analysis type restricted to users with a paid plan. For more details please visit our product & pricing page or contact sales.

    Choose Multi-purpose analysis type and click on ‘Create Simulation’. This will lead to the SimScale Workbench with the following simulation tree and the respective settings:

    multi-purpose simulation tree
    Figure 4: Simulation tree for Multi-purpose analysis in SimScale Workbench

    Global Settings

    To access the global settings, click on ‘Multi-purpose’ in the simulation tree. The following parameters are available to define the fluid flow simulation:

    • Compressible: Toggle on if a compressible flow simulation is desired with heat transfer.
    • Multicomponent: Toggle on when simulating the mixing of two or more fluids with different densities and viscosities.
    • Multiphase: Multiphase simulations can be performed for multiple fluids with different phases. Works only with transient analyses.
    • Number of phases: Specify the number of phases involved in the multiphase simulation.
    • Cavitation model: Toggle on to include the cavitation phenomenon using the constant gas mass fraction model.
    • Turbulence model: Besides the laminar model the solver supports the k-epsilon turbulence model.
    • Time dependency: Both Transient (time-dependent) and Steady-state options are available.
    multi-purpose global settings
    Figure 5: Multi-purpose Global settings

    Geometry

    The Geometry section allows you to view and select the CAD model required for the simulation. In general, having a clean CAD model always helps to avoid any meshing or simulation-related errors. However, the mesher is pretty robust and if the CAD is genuinely dirty then a message of mesh failure and further instructions on CAD cleaning or mesh refinement should appear.

    Find more details about CAD preparation here.

    If the simulation has a rotating component, then rotating zones need to be created for each rotating part. You can find a detailed approach to CAD preparation in the following article:

    Model

    Under Model, gravity can be defined via a vector. The global coordinate system, represented by the orientation cube, applies to the direction of gravity. The vector coordinates \(g_x\), \(g_y\), and \(g_z\) represent the x, y, and z directions.

    Surface tension can also be set for multiphase simulations. The default value of the surface tension coefficient is set to zero, 

    surface tension in subsonic analysis
    Figure 6: Model setup to define surface tension and gravity

    Materials

    Under Materials, the appropriate fluid for the simulation can be chosen from the materials library. The user has the option to change certain fluid properties. For compressible simulations, since the temperature is involved the user needs to specify the corresponding thermophysical properties for the fluid in consideration.

    Along with perfect gas behavior, it is possible to model real gas behavior also by specifying material properties as a function of pressure and temperature.

    Real gas modelling

    Fluids operating at very high pressure or low temperatures do not follow ideal gas behavior. For such ‘real’ fluids, more complex relations specifying the physical and thermodynamic properties are required, known as the real gas model.
    For example, flow of refrigerant in compressors, flow of steam in a steam turbine, flow of gas mixture in a piping system etc.
    To simulate real fluids the compressible flow toggle needs to be on under global settings as discused earlier.

    For more information, please visit the relevant documentation page for materials.

    Initial Conditions

    Initial conditions define the values which the solutions fields will be initialized with. For Multi-purpose analysis, Initial conditions can be set up in the simulation tree only when the multiphase is toggled on under global settings. The phase fraction can be initialized globally or for a specific region as a subdomain for all the phases involved.

    multi-purpose multiphase phase fraction initialization
    Figure 7: Phase fraction initialization inside a subdomain for multiphase simulations.

    Boundary Conditions

    Boundary conditions help to add closure to the problem at hand by defining how a system interacts with the environment. In an incompressible simulation, the computational domain will be solved for two fields: pressure \((P)\), velocity \((U)\), while for a compressible simulation the temperature \((T)\) field is also involved. Additional turbulent transport quantities may be included based on the turbulence model selected.

    The following boundary conditions are available for a Multi-purpose simulation:

    Important

  • In case no boundary conditions are assigned to a face, by default it will receive a no-slip wall boundary condition with wall function for turbulence resolution along with a zero-gradient condition for temperature. In this case the walls will be treated as smooth walls with zero roughness height.

  • The total temperature can be specified under the pressure-inlet boundary condition settings:
    total temperature input under subsonic pressure inlet
    Figure 8: Total temperature input is available under the Pressure inlet boundary condition when compressible flow is toggled on for Multi-purpose simulations.

  • Parametric Studies

    Multi-purpose analysis type allows parametric studies with the velocity boundary condition. When you select Flow rate as the velocity type while assigning velocity to an inlet or outlet face then you can input multiple flowrates at once either directly or by uploading a file.

    This will initiate multiple runs with different flow rates assigned at once in parallel giving the user a huge time advantage.

    parametric flow rate setup in simscale using Multi-purpose analysis type
    Figure 9: Multi-purpose parametric flow rate set up. Either add flowrates or upload a file.
    Multi-purpose parametric runs in parallel
    Figure 10: Multi-purpose parametric study runs in parallel saving on large computational expenses while also allowing a comparative study.

    Results become available for individual flow rates as separate runs (Run 1, Run 2,……) and also for the complete parametric study where the whole parametric curve is plotted. Figure 11 shows the pressure difference curve for all 8 flow rates assigned under the simulation run named Test run by the user.

    delta p for the parametric curve
    Figure 11: Pressure difference \(\Delta p\) for the complete parametric flow rate study is available under simulation results along with results for the individual runs.

    Advanced Concepts

    Under Advanced concepts, you will find additional setup options for rotating zones and porous media.

    • Rotating zones can be used to model rotating systems such as turbines, fans, ventilators, and similar systems. Currently, the MRF (Multiple Reference Frame) type is supported.
    • Porous media concept allows users to define regions with porosity characteristics within the computational domain.

    Simulation Control

    The Simulation control settings define the general controls over the simulation. There are differences in the setup parameters, depending on the Time dependency of the analysis. Find below the differences between transient and steady-state analyses:

    subsonic simulation control
    Figure 12: Steady-state (left) and transient (right) setup parameters for the simulation control

    In the simulation control settings, there are only two parameters exclusive to the Multi-purpose analysis type:

    • Number of iterations:
      • Steady state: It represents the number of iterations beyond which the simulation terminates, i.e., no more iterations will be performed.
    • Convergence criteria: The relative residual is the ratio of the current iteration residual to the running maximum residual -the maximum residual until that iteration.
      • Steady-state: A relative residual is computed by dividing the residual at each iteration to the running maximum value. Once the relative residuals fall below the convergence criteria for all equations, the simulation is assumed to be converged and will stop. Lower values like 0.001 are recommended for convergence.
      • Transient: For a transient simulation, a relative residual is defined by dividing the residual of each sub-iteration (iteration per timestep) by the running maximum. The simulation progresses to the next timestep if this relative residual falls below the convergence criteria or the number of maximum sub-iterations per timestep is reached. Currently, the default maximum limit to the number of iterations per time step is 25. In case of no convergence, the relative residual for the last sub-iteration for that time step is recorded and we move forward to the next time step. The recommended value for convergence criteria is 0.1.

    For a complete overview of the other simulation control parameters and their meaning, please check out this page.

    Result Control

    The Result Control section allows users to define additional simulation result outputs. It controls how the results will be written meaning the write frequency, location, statistics of the output data, etc. The following control items are supported:

    • Forces and moments: Calculates the forces and moments on a specific surface or set of surfaces. This is useful, for example, when one wants to find pressure and viscous forces on turbine blades in a hydrodynamic analysis.
    • Surface data: Calculates average or an integral sum of the simulation results on a specified surface area.

    Mesh Settings

    For the Multi-purpose analysis type, the mesh generated is a Cartesian mesh which means that each cell represents a cube with edges parallel to the XYZ Cartesian axes making the mesh highly orthogonal.

    The meshing algorithm is automated and follows a top-down approach which works by creating a binary tree structure. The bounding box (an imaginary box encompassing the dimensions of the flow domain) is refined anisotropically by cutting cells in the first layer (x-direction), in the second layer (y-direction), and the third layer (z-direction).

    For the mesh in Multi-purpose analysis, the settings can be set to automatic or manual. The parameters under each mode are described below:

    Automatic

    The user gets to define the following parameters:

    • Fineness: It automatically controls the fineness levels for the mesh cells varying from Coarse (1) to Fine (10).
    • Merge CAD surfaces: It combines (merges) the faces of each CAD volume, making it easier to mesh. Any CAD faces with boundary conditions or result controls are left untouched. This feature does not repair faults in the CAD geometry or add/subtract surfaces. It is intended to optimize the arrangement of CAD surfaces for improved mesh generation. This feature makes the mesh generation process more robust with:
      • Improved meshing of small surfaces
      • Better handling of complicated, multi-part geometries
      • Better mesh distribution, saving simulation time and core hours
    cad surface merging builds robust mesh
    Figure 13: With Merge CAD surfaces toggled on mesh generation is quite successful even at coarse fineness levels. This image compares two scenarios of mesh attempts within the Multi-purpose solver where the mesh failed initially even at high fineness levels and generated successfully even at the coarsest level.

    Manual

    The user gets to define the following parameters:

    • Cell size specification: It controls if the following parameters are entered as Absolute values, in corresponding length units, or they are rather Relative to CAD, in which case the parameters represent a fraction of the representative length of the model.
    • Minimum cell size: This parameter specifies the minimum size for all cells of the resulting mesh.
    • Maximum cell size: It specifies the maximum size for all cells of the resulting mesh.
    • Cell size on surfaces: This parameter specifies the size for all cells on and close to the surfaces.
    • Specify growth rate: It specifies the cell size ratio between the adjacent cells. It needs to be a whole number greater than 1 such that the cell size increases towards the interior of the mesh domain. For example, a value of 2 would mean that the inner cell is twice as big as its adjacent cell closer to the surface.
    • Merge CAD surfaces: Same as discussed above for the automatic mesher.
    subsonic mesh settings
    Figure 14: Automatic (top), Manual>Relative to CAD (middle), and Manual>Absolute mesh settings for the Multi-purpose analysis type

    Best Practices for Multi-purpose Mesher

    Region Refinements

    For additional mesh refinements on specific volume regions within the simulation domain, the choice of region refinement is available.

    subsonic mesh region refinement
    Figure 15: Region refinement settings require a target cell size to be specified.

    These volume regions or refinement zones can be created using geometry primitives.

    Target cell size: This parameter specifies the length scale of all the cartesian cells lying within the defined refinement zone. The resulting cell size might be smaller than the target specified to accommodate for the binary-tree mesh algorithm.

    Smaller cell sizes mean larger mesh size and consequently longer simulation runtimes.

    Note

    The meshing log and the mesh are only visible once the simulation is finished. However, the time per iteration and the time to convergence are a lot lower compared to other solvers.

    Your core hours will be consumed only after a successful simulation run.

    Once all the settings are defined, click on ‘Simulation Runs’ to begin the simulation.

    Post-Processing

    After the simulation is finished the SimScale’s integrated post-processor can be used to visualize the mesh as well as the simulation results.

    Convergence Plots

    As explained under Simulation control > Convergence criteria, convergence plots are available for post-processing during and after the simulation run. The following images show convergence plots for residuals for a steady-state and a transient simulation of an Ercoftac pump respectively.

    Multi-purpose steady-state residuals
    Figure 16: Convergence of residuals for the variables involved in the simulation physics are plotted against iterations for a steady-state simulation.

    In Figure 16 the residual on the y-axis is a relative residual, the ratio between the residual at that iteration to the running maximum residual.

    Multi-purpose steady-state residuals
    Figure 17: Convergence of residuals for the variables involved in the simulation physics are plotted against time-steps for a transient simulation

    In Figure 17 the residual on the y-axis is a relative residual, the ratio between the residual at the last sub-iteration of that particular timestep to the running maximum residual.

    Mesh Visualization

    For a Multi-purpose simulation, the mesh quality parameters can be viewed within the SimScale’s integrated processor. This allows the user to inspect mesh criteria and use this information to improve the mesh. The following mesh parameters are available.

    • Volume Ratio
    • Cell Volume
    • Minimum Edge Length
    • Non-Orthogonality
    • Edge Ratio

    Mesh criteria can be displayed using various filters. Figure 18 shows an example of the non-orthogonality displayed on a cutting plane through a centrifugal pump. Please find more information on mesh quality parameters and the suggested mesh quality values here.

    SubSonic Non-orthogonality on a cutting plane
    Figure 18: Visualization of the non-orthogonality on a cutting plane through a centrifugal pump

    Relative Velocity

    An additional Field Output only available in a Multi-purpose simulation is the Relative Velocity. This field function is used to evaluate the velocity of the fluid relative to the rotational velocity of the rotating region. It is applicable only within the rotating zone and every other region is greyed out. The relative velocity is calculated as in equation 1.

    $$ Relative \ Velocity = Local\ Velocity\ – Rotational\ Speed \times Local\ Radius \tag{1} $$

    The Local Velocity is the velocity at the centroid of a cell within the rotating zone and the Local Radius is the distance of the centroid of the cell to the origin of the rotating zone. By multiplying the Rotational Speed of the rotating region with the Local Radius the Local Rotational Velocity is calculated. Thus the Relative Velocity is calculated by subtracting the Local Rotational Velocity from the Local Velocity.

    Figure 19 shows an example of the Local Velocity in comparison to the Relative Velocity.

    SubSonic Relative Velocity compare
    Figure 19: Comparison between the velocity magnitude [left] and the relative velocity [right]

    Did you know?

    An advantage of using Multi-purpose analysis involving rotating flows is that power about the axis of rotation is directly output.

    Last updated: October 22nd, 2024

    Contents