|
[Sponsors] |
irregular model simulation with chtMultiregionFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 31, 2012, 12:24 |
irregular model simulation with chtMultiregionFoam
|
#1 |
Member
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 15 |
Hello everyone
I am simulating a turbulence and heat transfer problem with chtMultiregionFoam.But the geometrical model is irregular.It looks like the picture I attached.I have used chtMultiregionFoam before but with simple model only ,like rectangular duct flow.So I just know how to deal with the simple model which I can assign different fields in the file named makeCellSets.setSet easily. Can you tell me how to assign the different domains with complex geometrical model?The meshes I used are generated with ICEM. Thank you very much! regards! lg88 |
|
September 1, 2012, 09:44 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi lg88,
Well... since the mesh is coming from somewhere else, you'll need some form of identification coming from the ICEM's side. So it really depends on how far you've gotten right now. Are you able to export and convert the whole and complete mesh to OpenFOAM? Or are you exporting in parts? You can use STL surfaces to help isolate the zones for each volume and then use surfaceToPatch. Then work from there with setSet or topoSet. If the meshes come in separate volumes, you'll have to use mergeMesh at some point... either before or after the sets have been defined. Good luck! Bruno
__________________
|
|
September 1, 2012, 10:51 |
|
#3 |
Member
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 15 |
Hi Bruno
Yes ,I have exported and converted the whole and complete mesh to OpenFOAM.But if necessary I think I can exported the mesh in parts also. Code:
You can use STL surfaces to help isolate the zones for each volume and then use surfaceToPatch. Then work from there with setSet or topoSet. How to use surfaceToPatch and setSet or topoSet? Can you tell me where can I obtain relative tutorials or information about that? Thank you very much! lg88 |
|
September 2, 2012, 05:33 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi lg88,
Have you never used snappyHexMesh? STL is the usual file format for 3D geometries, which was the first format used with snappyHexMesh in the famous "motorBike" tutorial. You can find such STL files being used with snappyHexMesh in the tutorial "heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater". Run the following commands to see tutorials that use topoSet, createPatch and so on: Code:
find $FOAM_TUTORIALS -name topoSetDict find $FOAM_TUTORIALS -name createPatchDict As for surfaceToPatch, it should be intuitive after you understand the other tutorials, specially if you check the arguments it expects: Code:
surfaceToPatch -help Bruno
__________________
|
|
September 2, 2012, 07:10 |
|
#5 |
Member
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 15 |
Hi Bruno
Yes,I have never used snappyHexMesh.The mesh I used before was generated by ICEM.And I will look into the tutorials which you suggested. By the way, Code:
If the meshes come in separate volumes, you'll have to use mergeMesh at some point... regards lg88 |
|
September 2, 2012, 08:33 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi lg88,
I wrote "at some point", in the sense of bullet points. The steps I imagined were:
As for mergeMeshes: unfortunately I've never understood it very well either. All I know is that mergeMesh will place the requested meshes into the same mesh space, but it will not attach faces automatically. Here's the page at openfoamwiki.net: http://openfoamwiki.net/index.php/MergeMeshes Good luck! Bruno
__________________
|
|
September 4, 2012, 08:56 |
|
#7 |
Member
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 15 |
Hi Bruno
Can you tell me how to define cells for each volume as a particular cell zone?The second step that you told me to do.I just give them different region names and put them at different folders as the folder structure in chtMultiRegionHeater. regards! lg88 |
|
September 4, 2012, 15:59 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi lg88,
OK, let's try to do this in steps then. Here's what I'm going to ask you to do:
This way it'll be easier to explain how to do it, namely with a practical example. Best regards, Bruno
__________________
|
|
December 22, 2013, 05:45 |
|
#9 | |
Member
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 13 |
[Moderator note: The following quote is a group of posts that were moved from this thread: http://www.cfd-online.com/Forums/openfoam-solving/123840-heattransfer-pipe-using-chtmultiregionfoam.html]
Quote:
Hi Bruno, I want to learn how to define boundaries of a irregular region. I have a U-shape pipe which is buried in a solid region. I create this U-pipe using the topoSetDict and the blockMesh was defined for the cubic solid region. Now, I have a problem defining boundaries. In the chtMultiRegionFoam/multiRegionLiquidHeater the boundaries were defined as minX,maxX,minY,maxY, blaaa But, in my case this is only can be valid for solid. But for the fluid, as I have to give different boundary condition for inlet and outlet of the pipe, I can't understand how to define boundaries. I have attached the schematic of my domain. Can you give me a hint for this. Best, Kumudu Last edited by wyldckat; December 26, 2013 at 12:48. Reason: So much information, have to collate it all into one post |
||
December 26, 2013, 13:08 |
|
#10 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Kumudu,
OK, regarding the case set-up, I suggest that you start by studying this very simple tutorial: http://openfoamwiki.net/index.php/Ge..._-_planeWall2D - then start playing with the case configuration, as explained in that tutorial. This will give you more experience than any answer people can give you. In addition, it will give you the sense that you need (and how) to be able validate your simulations. As for the geometry+mesh, I suggest you should do one step at a time, by starting with a simple example and then gradually add more complexity to it. In summary, I suggest that you follow these steps:
Best regards, Bruno
__________________
|
|
December 26, 2013, 13:21 |
|
#11 | |
Member
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 13 |
Quote:
Thank you very much. I have already done steps up to 3rd . I just have to go through the 4rth step. Thanks again. This means a lot to me. Best, Kumudu |
||
December 26, 2013, 13:29 |
|
#12 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
OK, then what exactly do you have?
|
||
December 26, 2013, 14:49 |
|
#13 | |
Member
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 13 |
Quote:
I didn't do it right now. I am not that talented. I did it before. I created a single blockMesh. And created regions using topoSet. Since, after topoSet command is run, I ran the command, splitMeshRegions -cellZones -overwrite. Now I have more than one block. Only problem I had using multiRegionLiquidHeater tutorial case, is my less knowledge in merging mesh, I guess. I can't understand how to define boundaries as inlet and outlet for the fluid region. Because , I used only one blockMesh. I am attaching the one pipe case, that I created.I realized that some boundary conditions may be wrong. I will make them correct and upload the corrected one. I will upload the fluid region having the U-shape created using topoSet. And blockMeshDict (one block). then, you can tell me exactly what should I do to define different boundaries at the blockMesh. Thank Bruno, Kumudu |
||
December 26, 2013, 15:09 |
|
#14 |
Member
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 13 |
Hi Bruno,
I think I have misunderstood the steps. I haven't really go through SwiftBlock properly. I will go through these steps. And let you know. I thought you are saying that make a one fluid region using one pipe. I am really going crazy with thesis. Thanks again. Once I did all these steps, I will posted the new one. Best, Kumudu |
|
December 26, 2013, 15:28 |
|
#15 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Kumudu,
This is indeed a nice simple example! Although a bit familiar... looks a bit like the 2D plane wall: http://openfoamwiki.net/index.php/Ge..._-_planeWall2D - but extended to 3D. You've got at least one problem here, as shown in the attached image "Screenshot from 2013-12-26 19:06:11.jpg", that after running splitMeshRegions, the 3 regions are far from perfect. You need to better define the boxes in "topoSetDict". Have a look into the region folders inside the "constant" folder. Look for the files "polyMesh/boundary" in all of them and you'll find the names of the patches that were assigned automatically to each one side of the regions. For example, if you look into the file "constant/bottomWater/polyMesh/boundary", you'll find two new patches:
Quote:
Good luck! Best regards, Bruno
__________________
|
||
December 27, 2013, 03:20 |
|
#16 | ||
Member
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 13 |
Thanks Bruno,
You are so generous and brilliant. Above the the comment, I think, I understood the problem. Quote:
Quote:
In the Example/system/bottomWater/changeDictionaryDict, I have defined, the boundary conditions for velocity and temperature For velocity,U Code:
U { internalField uniform (0 0 -4); boundaryField { maxZ { type fixedValue; value uniform (0 0 -4); } minZ { type zeroGradient; } ".*" //isn't this automatically refers to all other boundaries including bottomWater_to_leftSolid & bottomWater_to_rightSolid { type fixedValue; value uniform (0 0 0); } Code:
T { internalField uniform 273; boundaryField { maxZ { type fixedValue; value uniform 273; } minZ { type zeroGradient; } ".*" { type zeroGradient; value uniform 273; } "bottomWater_to_.*" //isn't this refers to the boundaries bottomWater_to_leftSolid & bottomWater_to_rightSolid { type compressible::turbulentTemperatureCoupledBaffleMixed; neighbourFieldName T; K basicThermo; KName none; value uniform 273; } } } Thanks again. Kumudu Last edited by wyldckat; December 27, 2013 at 15:15. Reason: Added [CODE][/CODE] and fixed broken quotes |
|||
December 27, 2013, 05:24 |
|
#17 | |
Member
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 13 |
Quote:
Dear Bruno, As you suggested I read the link on SwiftBlock. I think this for irregular geometries. For the time being, I just need to create the U-pipe using three rectangles. That is done. For now, I am not concern about the cylindrical Shapes of pipes. I have created the U-pipe using topoSet. As I said before, my only concern is to define the boundaries of the region I created for fluid because I need to name the boundaries of the liquid region as inlet, outlet and wall. You can see that, in the attachment that I have created the U-pipe easily using topoSet. I can do this for cylindrical shape (without using boxToCell ) using cylinderToCell. So, I will get the pipe (cylindrical shape) geometry easily. I did the following, blockMesh for ground (a cube with for now I reducing the sizes to 120 mm*120mm*50m) topoSet (this will create liquid region as the U-shape pipe and other all parts as ground) splitMeshRegions -cellZones -overwrite ok, now I have U-shape block for liquid region and cubic shape block for ground, cells other than included in the water (pipe shape). This way I can get a perfect mesh without any complex meshing method. Lets say, I defined one block in the blockMeshDict with all faces as walls. So, my U-shape is with walls. I can even change the inlet and outlet as patches if I am considering my pipe flow as open pipe flow by setting maxZ into patches in the changeDictionaryDict. So, every thing is good, other than defining inlet and outlet boundary conditions for liquid. Because, If I consider closed pipe flow, B.C for velocity, inlet, fixedValue= (0,0,-4) outlet, zeroGradient wall, fixedValue = (0,0,0) Just tell me now how to define the inlet and outlet faces as the same to liquid. Then, I can easily give required boundary conditions in the changeDictionaryDict as follows, Code:
U { internalField uniform (0 0 -4); boundaryField { inlet { type fixedValue; value $internalField } outlet { type zeroGradient; } ".*" { type fixedValue; value uniform (0 0 0); } } } Thank you very much for helping me. I am really really grateful to you for this. Best regards, Kumudu Last edited by wyldckat; December 27, 2013 at 15:16. Reason: Added [CODE][/CODE] |
||
December 27, 2013, 15:46 |
|
#18 | |||||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Kumudu,
Quote:
Quote:
Quote:
Quote:
Quote:
OK, the main utility that you are missing and are searching for is createPatch. It's similar to topoSet, in the sense that the dictionary shares some similar features, but the objective of createPatch is very simple: to take a "faceSet", existing patch or patches and create a new patch from any of them. It will also do some house cleaning, by removing the patches that have no mesh faces assigned to them . Therefore, since you already have good experience with topoSet, you can easily create one or more "faceSet" that are the selection of faces in already existing patches, even in case you don't want to use the whole patch. In case you don't already know, this page gives a very nice description of what topoSet can do: http://openfoamwiki.net/index.php/TopoSet Now for createPatch: http://openfoamwiki.net/index.php/CreatePatch - That wiki pretty much sums it all very nicely. The information that might escape you upon reading the wiki page is this:
Best regards, Bruno
__________________
|
||||||
December 27, 2013, 16:07 |
|
#19 | |
Member
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 13 |
Quote:
Again, I am really grateful to you. Thanks, Kumudu |
||
December 28, 2013, 07:16 |
|
#20 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Kumudu,
You're welcome! Keep in mind that the "faceSet" is a selection of faces. So don't expect square-like faces to magically adjust to the shape of a cylinder face In other words: the selection won't modify the mesh itself. But you can do some mesh manipulation, once the correct selections are made and operated upon. Not wanting to throw you off the right track, but this is just to give you an idea of what can be done with sets: http://openfoamwiki.net/index.php/SetSet#Usage_example - in that example, the idea is to select all cells and faces that are sort-of damaged and remove them completely by using subsetMesh to operate on the cell selection. Best regards, Bruno
__________________
|
|
Tags |
fields chtmultiregionfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simulation of a single bubble with a VOF-method | Suzzn | CFX | 21 | January 29, 2018 01:58 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |
LES simulation with Smagorinsky2 model | Zuixy | OpenFOAM Running, Solving & CFD | 3 | October 20, 2011 07:17 |
Turbulence model in a simulation with wide spatial range of Reynolds numbers | Chander | CFX | 33 | September 28, 2011 09:48 |
Experimental And Simulation Data for my model | Timothy Song | Siemens | 0 | January 12, 2009 06:23 |