Simulation with two (or more) inlets with different densities

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

Post Reply
ReneSci
Posts: 23
Joined: Thu Aug 18, 2022 4:30 pm

Simulation with two (or more) inlets with different densities

Post by ReneSci »

Want to do an simulation which is not a potential flow.

I am fairly new in CFD but have seen the good "A ten-part video series about CfdOF" among quite a numer of other introductions. This one is not my first simulation. Also seen Most of the series made by Steve Brunton e.g. "Turbulence: Reynolds Averaged Navier-Stokes (Part 1, Mass Continuity Equation)" , "
Turbulence: Reynolds Averaged Navier-Stokes " https://www.youtube.com/watch?v=mDt-HJEXK6g

----
When setting up an simulation with e.g. a pipe, carrying an airflow, ending in an ambient airflow, I have defined two FluidProperties defining the two air masses. When I set up the two inlets (the pipe and the ambient air mass) and under each inlet definition want to assign the corresponding FluidProperty to each inlet using the property "Inflow Volume Fractions" - it is only possible to choose the one FluidProperties which stands topmost in the model-tree - is that correct ?

CfdOF is a indeed a great tool
Attachments
RSH_Two_Flows.FCStd
(30.26 KiB) Downloaded 44 times
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Simulation with two (or more) inlets with different densities

Post by thschrader »

Hello,
I had a short look at your model, but I did not try to get it running.
Here is an example (waterjet):
At first you define the fluid (air) which is pumped into the waterfilled domain.
Second fluid is water. For the air you must define a initialisation zone, the pink cube.
To start with the sim avoid pressure at the inlets.
Check gravity vektor! In this case g points in +x-direction.
At a first step I would recommend to run a 2D-sim with a planar mesh to check if the basic modell works.
The example runs very fast, so you can check nessesary changes, mesh refinement and s.o.
Your computing domain is 100x50x50 mm, which gives at least 250000 cells even with a coarse mesh.
Greetings
Thomas

(As you can see in the example, the water inlet speed is to slow, the air rises....)
2D_Model_interfoam.FCStd
(34.15 KiB) Downloaded 46 times
waterjet.JPG
waterjet.JPG (69.38 KiB) Viewed 964 times
Done with bluecfd and

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * BIM
  * CfdOF 1.17.6
  * Curves 0.3.0
  * Defeaturing_WB
  * dodo
  * Fasteners
  * FEM_FrontISTR 0.1.0
  * Manipulator 1.4.3
  * Plot
  * Reinforcement
  * WorkFeature
ReneSci
Posts: 23
Joined: Thu Aug 18, 2022 4:30 pm

Re: Simulation with two (or more) inlets with different densities

Post by ReneSci »

Thank you for the prompt reply.

If I understand the function of the "initialization Zone" - it places a volume of e.g. water with the shape as the drawn solid e.g. a cube.z

I tried to remove the InitializationZone in your example (Sorry - I don't know how to place an image nicely in the text like you do
2022-08-22 15_53_34-FreeCAD 0.20.png
2022-08-22 15_53_34-FreeCAD 0.20.png (12.93 KiB) Viewed 873 times
It seems to work ok:
2022-08-22 16_38_53-ParaView 5.5.2 64-bit.png
2022-08-22 16_38_53-ParaView 5.5.2 64-bit.png (51.61 KiB) Viewed 859 times


It seems like, when defining an inlet, one can only choose the topmost among the "fluid properties" for an inlet - does the cfdOF then automatically assume that if I put "Volume Fraction" = 0 then that inlet must be the other kind of fluid (water in this case) ?

Logically, I would expect that all the defined fluids (With a FluidProperty for each fluid) would appear in the drop-down menu such that the user can determine which fluid/fluids should be emitted from each inlet.
2022-08-22 16_05_04-FreeCAD 0.20.png
2022-08-22 16_05_04-FreeCAD 0.20.png (5.89 KiB) Viewed 873 times
2022-08-22 16_07_17-FreeCAD 0.20.png
2022-08-22 16_07_17-FreeCAD 0.20.png (10.07 KiB) Viewed 873 times

I tried to add another inlet port - with oil. I have attached it. It won't work :-(

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: Danish/Denmark (da_DK)
Installed mods: 
  * A2plus 0.4.56a
  * ArchTextures
  * Assembly4 0.12.3
  * Cfd
  * CfdOF 1.17.7
  * Defeaturing
  * Dracula 0.0.2
  * ExtremeProDark 1.0.4
  * IconThemes
  * lattice2 1.0.0
  * Manipulator 1.4.9
  * MeshRemodel 1.8919.0
  * parts_library
  * Plot 2022.4.17
  * sheetmetal 0.2.56
  * workfeature
Attachments
2D_Model_interfoam RSH - 3 ports.FCStd
(36.83 KiB) Downloaded 39 times
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Simulation with two (or more) inlets with different densities

Post by thschrader »

ReneSci wrote: Mon Aug 22, 2022 2:17 pm ...
It seems like, when defining an inlet, one can only choose the topmost among the "fluid properties" for an inlet - does the cfdOF then automatically assume that if I put "Volume Fraction" = 0 then that inlet must be the other kind of fluid (water in this case) ?
...
Before I talk too much:
Have a look at the tutorials from Josef Nagy about multiphase simulation with interfoam.
I have done the 5 tutos by myself some time ago. You can do that with the cfdof-wb.
Josef explains in detail why the input files look like as they do...
Regards Thomas
https://www.youtube.com/watch?v=gZ_TqsPwiXY
https://www.youtube.com/c/J%C3%B3zsefNa ... uru/videos
Post Reply