In this article you will find an example showcasing how to initialize the VOF solution using the insidePart() Field Function operator together with a VOF wave
Attachments: | inside-part-vofwave.sim (1.10 MB) |
In certain simulations, such as liquid containers on a seabound ship (even LNG carriers), there is a need to understand the sloshing of liquid inside the container. This necessitates a special initialization i.e., domain is partially initialized with VOF waves and container with user defined field functions. Consider, for example, the below domain. To initialize the water as shown below red mark, we cannot use simple VOF wave field function (as it can't initialize the inside block with required level as shown). We need to write a complex field function to position the block and include the VOF wave to initialize the whole domain. However, availability of insidepart field function along with VOF waves, greatly simplifies the initialization process as demonstrated below:
To initialize water to 75% water level as shown below, create a new part with the name waterlevel which will be used for insidepart field function.
Create a Multiphase simulation with VOF physics and set the two phases water and air,. Enable VOF waves under physics, as soon as we create this, we will have two field functions corresponding to VOF waves (VolumeFractionHeavyFluidWave and VolumeFractionLightFluidWave)
Finally, our field function looks as below:
Field function : water-initialize
Definition : insidePart(@GeometryPart("waterlevel"))?1:${VolumeFractionHeavyFluidWave1}
This function uses the inbuilt insidepart function to initialize water inside the waterlevel part; elsewhere, it uses the VOF wave field function (VolumeFractionHeavyFluidWave1)
Finally, set the field function under initial conditions and interface between block and outer domain to baffle , as shown
Initial liquid level looks like below.
You can find the sim attached to refer the process.