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

    How to Add Materials and Initialize the Domain in Multiphase Simulations?

    In multiphase simulations, how can I add two materials to my computational domain? Furthermore, how can I configure the material initialization for my simulation?

    This article will elaborate on the workflow for these queries in detail.

    Model

    Gravity and surface tension ensure that Multiphase simulations accurately represent the complex interactions between different fluid phases, leading to more precise and meaningful results. While gravity affects the movement and distribution of fluids within the simulation, surface tension governs the behavior at the interface between different fluid phases. It affects the formation and stability of droplets, bubbles, and other interfacial phenomena. Under the Model option it is possible to set the gravity and the surface tension between a liquid and gas phase.

    Figure 1: Gravity influences fluid movement and distribution, while surface tension governs interfacial dynamics and phase separation in Multiphase simulations.

    Defining Materials

    Multiphase analyses are different from other analysis types, in the sense that we must define two fluid materials in the setup. The process is simple – the user creates two fluid materials and assigns them to the same volume. Let’s go through an example of a waterfall multiphase project, where both water and air are present:

    waterfall project material assignment multiphase
    Figure 2: Geometry used in the project showing initial and flow conditions

    In this multiphase project, water will enter the domain through the top boundary (1), and we also have a pool of water initialized under the yellow dashed line (2)

    Therefore, let’s first assign air to the computational domain, with the steps below:

    assigning air material to a multiphase simulation
    Figure 3: In multiphase analyses, we always assign the entire flow region to our materials
    1. By clicking on the ‘+ button’ next to Materials, we select a new material for our project
    2. The flow region volume is assigned to Air

    Following the same process, we define our second material to the flow region:

    water assignment multiphase
    Figure 4: In multiphase simulations, the same flow region receives two material assignments

    It is important to note that the flow region always has two material assignments in multiphase projects.

    In figures 2 and 3, notice how each material represents a different phase: 0 for air, and 1 for water. These values are important for the initialization of the domain, and also for the boundary condition configuration.

    Domain Initialization

    To initialize the computational domain with a particular material, please navigate to Phase fraction under Initial conditions. The objective of this step is simple: the user needs to define what regions of the domain are initialized with Phase 0 and Phase1. In this example, 0 represents air, and 1 represents water.

    phase fraction initialization multiphase
    Figure 5: The phase initialization can be global or via subdomains. With these settings, we are globally initializing the domain with phase 0 (air)

    For a global initialization, the entire domain receives the same phase value. There is also an option to create Subdomains, which overwrites the global initialization. With Figure 1 in mind, we can initialize the domain globally with air (0) and use a subdomain to initialize the small pool of water (1).

    For the subdomain initialization, it is possible to either assign volumes or geometry primitives – see more details here. In our case, a geometry primitive is the only option:

    multiphase initialization via subdomains
    Figure 6: The subdomain configuration always overwrites the global initialization. With these settings, we initialize a pool of water with a cartesian box.

    In conclusion, by creating a geometry primitive with the appropriate dimensions, we initialize the domain with the phase fraction of interest.

    Did you know?

    The phase nomenclature is also useful for the boundary conditions. By using 0 or 1, you can tell the algorithm what material is flowing through the boundary:

    As an important note, we should always use 0 or 1, and never fractions like 0.5.

    SimScale allows us to work with custom boundary conditions, which can be useful for representing an outlet region characterized by atmospheric pressure. Since this is an outlet region, we do not need to specify the quantities of air and water exiting the domain.

     material definition multiphase simscale phase fraction
    Figure 7: With this configuration, we are going to have an inlet of water (phase value 1).
     material definition multiphase simscale phase fraction
    Figure 8: Custom boundary condition representing an outlet region.

    Expected Outcome

    As a result, we have the correct physics of a waterfall, as in the video below:

    Animation 1: Waterfall simulation results with the iso volumes filter. The initial pool of water is a result of the initial conditions.

    Last updated: April 2nd, 2025

    Contents