CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   chtMultiRegionFoam case (https://www.cfd-online.com/Forums/openfoam-solving/197720-chtmultiregionfoam-case.html)

Eko January 15, 2018 02:15

chtMultiRegionFoam case
 
Hey guys,

I am currently working on a case which I want to solve with the chtMultiRegionFoam solver and I have some questions on how to design my model so that it works without errors.

To my case:
I have a room with 2 cubes in it, 1 opening (inlet) on south side, 1 opening on north side and 1 Opening (outlet) in the ceiling. The cubes are heating the room up (heat source) and later I want to see how the air temperature changes when there is wind coming in (from the domain).


Now I have some questions on how to make this work

First of all the CAD or pre-processing:
As far as I know I have to make multiple STL files. I would have made one for the room, 2 for the cubes. (or should I split the room into floor, walls, ceiling?)
Do I also need to make a STL file of the air in the room and the inlets/outlets? Or will the wind (from the domain) flow right into the room if I just have opening in it?

And some questions to the domain:
I've set up the domain with blockMesh. Now the question is how do I add wind to the domain? And is there also a way to add a temperature to the domain which varies by time? Just like a daily temperature curve.


If there is already another thread with same questions or a solution just let me know. I didn't find one :/
Any help and tip is appreciated :)


Thanks in advance and keep on foaming guys :D

Eko January 16, 2018 02:56

Anone an idea?
Are there good tutorials which I can look at?
Need one with air as fluid and geometry meshed with SHM.

kera January 16, 2018 03:19

Hallo Eko!

I think this should at least get you started with what you are looking for.

Hope it helps!

Regards,
Ricky

Quote:

Originally Posted by Eko (Post 678274)
Anone an idea?
Are there good tutorials which I can look at?
Need one with air as fluid and geometry meshed with SHM.


Eko January 16, 2018 03:55

Quote:

Originally Posted by kera (Post 678276)
Hallo Eko!

I think this should at least get you started with what you are looking for.

Hope it helps!

Regards,
Ricky

Thanks Ricky but I already did this tutorial and looked at it while setting up my case. It helped me to understand things a little bit better but I don't know how I have to deal with inlet and outlets in my case? Do I have to make stl files for them and define them as inlets? Or can I just assume that wind from the domain will flow into the room when I have an opening in the wall?

kera January 16, 2018 05:47

Have a look into the "incompressible/simpleFoam/motorBike" case, it is a wind tunnel simulation. The mesh is generated using snappyHexMesh with inlet, outlet, walls etc..

Quote:

Originally Posted by Eko (Post 678087)


To my case:
I have a room with 2 cubes in it, 1 opening (inlet) on south side, 1 opening on north side and 1 Opening (outlet) in the ceiling. The cubes are heating the room up (heat source) and later I want to see how the air temperature changes when there is wind coming in (from the domain).


Now I have some questions on how to make this work

First of all the CAD or pre-processing:
As far as I know I have to make multiple STL files. I would have made one for the room, 2 for the cubes. (or should I split the room into floor, walls, ceiling?)
Do I also need to make a STL file of the air in the room and the inlets/outlets? Or will the wind (from the domain) flow right into the room if I just have opening in it?


Bloerb January 16, 2018 11:19

Your domain is fairly simple. Simply try it with blockMesh. One block for cube 1, another one for cube 2, and a few more for the room. Asign each block to a cellZone and split the resulting mesh into the resulting regions.

If you want to do it with snappyHexMesh you can create several stl files or since you only want to use cubes use the existing geometry sources like box.

The tricky part is only how you choose to mesh the regions. You can use one snappyHexMeshDict and mesh all regions at once and again split the mesh afterwards or mesh each region separately.

Eko January 17, 2018 02:00

The case I mentioned in the first post is a very simplified small one. I thought about doing it with blockMesh but want to work with SHM as I need it for my more complicated case later on. I do now have multiple stl files. 1 for the room, 1 for each cube and 1 for the air/fluid in the room.
I would've used splitMeshRegions command after succesfully meshing the geometry with SHM. I tried it out and it seems to work well. Just the geometry isn't where I want it in the domain.

So currently I am setting up and checking all boundaries and trying to get the geometry at the right position.

Quote:

Originally Posted by Bloerb (Post 678349)
Your domain is fairly simple. Simply try it with blockMesh. One block for cube 1, another one for cube 2, and a few more for the room. Asign each block to a cellZone and split the resulting mesh into the resulting regions.

If you want to do it with snappyHexMesh you can create several stl files or since you only want to use cubes use the existing geometry sources like box.

The tricky part is only how you choose to mesh the regions. You can use one snappyHexMeshDict and mesh all regions at once and again split the mesh afterwards or mesh each region separately.


Eko January 18, 2018 10:28

So guys I changed my case a little bit and set up everything. It all works fine until I start the simulation.
It starts solving but then I get this error message:

Quote:

--> FOAM FATAL ERROR:

request for polyMesh Umgebung from objectRegistry Simcht failed
available objects of type polyMesh are

7
(
Air
Building
Block-4
Block-3
Block-2
Block-5
Block-1
)


From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&, bool) const [with Type = Foam::polyMesh]
in file /home/pgh/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 239.

FOAM aborting
Does anyone have an idea how to solve this problem? I have the "Umgebung" directory in constant and there is also a polyMesh directory in it. I don't get what this error message is supposed to tell me :confused:

kera January 18, 2018 12:25

did you declare "Umgebung" in constant/regionProperties under fluid?



Quote:

Originally Posted by Eko (Post 678587)
So guys I changed my case a little bit and set up everything. It all works fine until I start the simulation.
It starts solving but then I get this error message:



Does anyone have an idea how to solve this problem? I have the "Umgebung" directory in constant and there is also a polyMesh directory in it. I don't get what this error message is supposed to tell me :confused:


Eko January 19, 2018 01:39

Quote:

Originally Posted by kera (Post 678602)
did you declare "Umgebung" in constant/regionProperties under fluid?

I was thinking about that all the time but didn't do it.
I will do now and see what happens. :)

Eko January 22, 2018 05:31

Simulation is running but I have a new issue. The cubes are heat sources so I made fvOptions files in constant/cube.
But when I start the simulation it doesn't seem to recognize these.
So just to make sure - do the fvOptions file belong in constant or system/cube?

Edit: Problem solved. fvOptions file in constant/region works.

Eko February 7, 2018 06:16

Hey guys I once more need your help :)

I want a wind in my domain with 5 m/s and have no clue how to deal with turbulence.

I am using the k-epsilon model and wanted to ask if anyone knows how to get the right k and epsilon values? Or can I just assume that it is laminar and turn turbulence off?

This is the last step. The simulation runs well with U=0 and laminar


All times are GMT -4. The time now is 04:57.