|
[Sponsors] |
[Other] Multiple internal wall an fluid zones |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 7, 2011, 14:39 |
Multiple internal wall an fluid zones
|
#1 |
Member
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 15 |
Hi Foamer
I am trying to convert a .msh file with multiple internal walls. After many try I have managed to reproduce the procedure from the open wiki http://openfoamwiki.net/index.php/Ho...internal_walls I have some problems and questions Firsts this procedure did note worked on a 2D quad mesh. When I do the checkMesh I have 3 kinds of error : « Checking topology... Boundary definition OK. ***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D. Cell to face addressing OK. ***Unused points found in the mesh, number unused by faces: 2 number unused by cells: 2 <<Writing 2 unused points to set unusedPoints Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces ... Patch Faces Points Surface topology entre_eau_brute 63 128 ok (non-closed singly connected) sortie_eau 32 66 ok (non-closed singly connected) degazage 250 502 ok (non-closed singly connected) surf_base_buse 16 34 ok (non-closed singly connected) wall 655 1316 ok (non-closed singly connected) frontAndBackPlanes 184008 185324 ok (non-closed singly connected) real-wall_buse_1 148 302 ok (non-closed singly connected) real-wall_buse_2 150 304 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-4.44089e-16 0 -0.0282843) (2 2 0.0282843) Mesh (non-empty, non-wedge) directions (0 0 0) Mesh (non-empty) directions (0 0 0) ***Number of edges not aligned with or perpendicular to non-empty directions: 360577 <<Writing 184185 points on non-aligned edges to set nonAlignedEdges ***Boundary openness (8.32459e-07 1.86471e-06 1.49086e-19) possible hole in boundary description. ***Open cells found, max cell openness: 0.333333, number of open cells 2 <<Writing 2 non closed cells to set nonClosedCells Minumum face area = 2.83025e-06. Maximum face area = 0.000622352. Face area magnitudes OK. Min volume = 1.60104e-07. Max volume = 5.96973e-06. Total volume = 0.226274. Cell volumes OK. Mesh non-orthogonality Max: 28.4768 average: 1.40368 Non-orthogonality check OK. Face pyramids OK. Max skewness = 0.750378 OK. » My second concern is when I try to apply the procedure to a multiple internal-wall mesh. I start with one of the internal wall. A new folder is created named 0.001. Inside I can find all the file corresponding to the new mesh. But I don't have any « Sets » folder as in the constant folder where the original mesh is still located. In the wiki it is indicated to use the instruction « SplitMeshWithSets ». The problem is that I am using OF 2.01 and this instruction is not available anymore. My question can be resume in « How can I apply several times the SplitMesh procedure on a given mesh » Third question, Can OF handle a mesh with multiple Fluid zone as in fluent. I am looking for a tuto on the subject. Has anyone some resource on the subject? Thanks a lot for you help. Regards, Miles |
|
September 7, 2011, 15:27 |
|
#2 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
What do you need the multiple zones for? Answer depends on that |
|||
September 7, 2011, 18:22 |
|
#3 |
Member
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 15 |
Hi
Thanks for your answer. Concerning the procedure described in the wiki, I agree that it looks outdated. The thing is that's the only source I had so far. I am gonna search the web for a tutorial on the utility you have just mentioned. Thanks for that. Note that the procedure seems to work as long as you only have one internal wall. So it was helpful as a start. I want to have many fluid zones for a lot of reason. I intend to do a multiphase simulation. And sometimes it is useful to have a full area in Witch you can impose velocity and volume fraction, instead of having just a surface inlet. Besides i want to do some MRF calculation in the future so according to my Fluent experience it might be useful to be able to set different condition in different fluid zone. But I am a OF beginner so maybe it is not necessary. Any advices are welcome. Thanks again. P.S.: Do you know if the createBaffles utility work with both tri, quad or even mixed meshes? |
|
September 8, 2011, 07:53 |
|
#4 |
Member
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 15 |
p { margin-bottom: 0.21cm; }
Hi again, I want to try the Createbaffle utility but I don't find any example on the subject. Does anyone have any source or documentation please? On the OF wiki I have found the user utility http://openfoamwiki.net/index.php/Co...mWithInternals It comes with a source code; do you know How i install additional codes on OF 2.0.? Last question I know this my sound wired but I have difficulties to understand the exact definition of some basic OF notion. In your advice you said " it uses faceZones instead of sets which should be preserved" What is a Set exactly What is the difference between a set and a zone. Therefore I should be able to understand the full meaning of your advice. Please do not doubt i have search the UG and in the Forum but people seem so familiar with the usual OF terms so it is hard to catch the train in motion. Thanks for any help |
|
September 8, 2011, 10:26 |
|
#5 | |||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Source should be at $FOAM_UTILITIES/mesh/manipulation Quote:
a) it won't compile with 2.0 b) that functionality is in the regular fluentMeshToFoam since a long time ago (check with -help) Quote:
You're venturing into the regions of OF that are not over-documented. I know that is hard. |
||||
September 8, 2011, 15:56 |
|
#6 |
Member
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 15 |
p { margin-bottom: 0.21cm; } Hi
I complete this thread with the method I have built in order to make multiple baffle definition. Please note that I am starting from a 2D mesh generated with TGRID or ANSYS MESHING. The file was of course in ASCII format. Step1 fluentMeshToFoam <case> -writeSets you'll get a mesh with a Sets folder including all the sets corresponding to all the surfaces inside your initial mesh I also get the Zones files but they were empty Step2 setsToZones -noFlipMap This will fill the Zones files that were empty after the first conversion Step3 Go in the boundary file and add 2 patches for the future pacth generated by the creation of the baffle add the line toto_1{ type wall; nFaces 0; startFace xxx; } toto_2 { type wall; nFaces 0; startFace xxx; } To get the number xxx just sum the number of faces of the last patch of your boundary file (before change of course) with the number startFace for this patch. N.B. : Do not forget to update the total number of patches at the beginnig of your boundary file since you are adding 2 new patches Step4 Add the boundary condition for a wall for the two new patches in the 0/ folder Step5 createBaffles -overwrite tata "(toto_1 toto_2)" tata is the name of the surface you want to convert into a baffle (it should be listed in your faceZones file or in the list of the file in your sets directory) You can repeat the procedure starting from step3 for every baffle you want to create N.B. : There is an option -additionalPatches that seems to avoid you to modify the boundary file yourself but I did not manage to make it work If you have something more straightforward than the heavy procedure I would love to know it. I will try on a 3D mesh to see if the baffle conversion is automatic and if not if this procedure works as well. |
|
April 25, 2012, 08:36 |
|
#7 |
Senior Member
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17 |
Hi Miles,
thanks for the description. Did you try it finally on 3D cases? I want to do the procedure on a fan geometry. Best, Attila |
|
April 25, 2012, 08:47 |
|
#8 |
Member
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 15 |
Hi,
It's been a while since I last digged in OF meshing conversion problems. But you can be sure that with a 3D geometry there is no need to worry about baffles: The baffles present in your geometry will automatically be conserved during the mesh conversion. Fluent3DMeshToFoam <case> If you want to keep the different fluid zones you may have defined in your mesh, use the -writeSets option. Regards, Miles |
|
April 25, 2012, 08:49 |
|
#9 |
Senior Member
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17 |
Okay, thank you!
Have a nice day, Attila |
|
July 17, 2012, 07:09 |
|
#10 |
New Member
Christoph Kratzsch
Join Date: Nov 2011
Location: Freiberg
Posts: 28
Rep Power: 15 |
Hiho Foamers,
I have a problem by using createBaffles to make internal walls with zero-thickness. OF-2.0.x My Case works as follows (just to give an overview): I have 5 Chambers divided by a very thin wall and from chamber to chamber a slot is in an alternating fashion left at the top or at the bottom of the chamber. On the bottom of each chamber is an inlet and an the top is the outlet. I will define each wall as a faceSet and then into a faceZone in the topoSetDict (and later with createBaffles as a boundary with zero thickness). Code:
actions ( //set faceSet and faceZone of Wall1 { name internalWall1; type faceSet; action new; source boxToFace; sourceInfo { box (0.10199 0 0.055) (.1021 0.15 0.25); } } { name internalWallZone1; type faceZoneSet; action new; source setToFaceZone; sourceInfo { set internalWall1; faceSet internalWall1; } } //set faceSet and faceZone of Wall2 { name internalWall2; type faceSet; action new; source boxToFace; sourceInfo { box (0.20399 0 0) (0.20401 0.15 0.25); } } { name internalWallZone2; type faceZoneSet; action new; source setToFaceZone; sourceInfo { set internalWall2; faceSet internalWall2; } } //and so on... But if i will run createBaffles for the first internal wall with: createBaffles internalWallZone1 '(internalWall1 internalWall1)' i get an output of createBaffles ending with an error-message: Code:
Create time Create mesh for time = 0 Converting faces on zone "internalWallZone1" into baffles. Found 100 faces on zone "internalWallZone1" Using master patch internalWall1 at index 11 Using slave patch internalWall1 at index 11 Reading geometric fields Reading volScalarField alphat Reading volScalarField p Reading volScalarField T Reading volScalarField k Reading volScalarField epsilon Reading volScalarField mut Reading volVectorField U #0 Foam::error::printStack(Foam::Ostream&) in "/app2/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc46DPOpt/lib/libOpenFOAM.so" #1 Foam::sigSegv::sigHandler(int) in "/app2/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc46DPOpt/lib/libOpenFOAM.so" #2 in "/lib/libc.so.6" #3 Foam::List<int>::operator=(Foam::UList<int> const&) in "/app2/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc46DPOpt/bin/createBaffles" #4 Foam::polyTopoChange::addFace(Foam::face const&, int, int, int, int, int, bool, int, int, bool) in "/app2/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc46DPOpt/lib/libdynamicMesh.so" #5 Foam::polyTopoChange::addMesh(Foam::polyMesh const&, Foam::List<int> const&, Foam::List<int> const&, Foam::List<int> const&, Foam::List<int> const&) in "/app2/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc46DPOpt/lib/libdynamicMesh.so" #6 Foam::polyTopoChange::polyTopoChange(Foam::polyMesh const&, bool) in "/app2/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc46DPOpt/lib/libdynamicMesh.so" #7 in "/app2/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc46DPOpt/bin/createBaffles" #8 __libc_start_main in "/lib/libc.so.6" #9 Foam::UOPstream::write(char) in "/app2/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc46DPOpt/bin/createBaffles" Speicherzugriffsfehler It seems that the error occur corresponding to the U-File, but i don't find anything odd there: Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { internalWall1 { type fixedValue; value uniform (0 0 0); } internalWall2 { type fixedValue; value uniform (0 0 0); } internalWall3 { type fixedValue; value uniform (0 0 0); } internalWall4 { type fixedValue; value uniform (0 0 0); } wallsFrontBackSide { type fixedValue; value uniform (0 0 0); } inletCh1 { type fixedValue; value uniform (0 0 16.5); } inletCh2 { type fixedValue; value uniform (0 0 23.3); } inletCh3 { type fixedValue; value uniform (0 0 13.2); } inletCh4 { type fixedValue; value uniform (0 0 23.5); } inletCh5 { type fixedValue; value uniform (0 0 10.0); } outletCh1 { type zeroGradient;//pressureInletOutletVelocity; //value uniform (0 0 0); } outletCh2 { type zeroGradient;//pressureInletOutletVelocity; //value uniform (0 0 0); } outletCh3 { type zeroGradient;//pressureInletOutletVelocity; //value uniform (0 0 0); } outletCh4 { type zeroGradient;//pressureInletOutletVelocity; //value uniform (0 0 0); } outletCh5 { type zeroGradient;//pressureInletOutletVelocity; //value uniform (0 0 0); } } Code:
internalWall1 { type wall; nFaces 100; startFace 78950; } internalWall2 { type wall; nFaces 100; startFace 79050; } internalWall3 { type wall; nFaces 100; startFace 79150; } internalWall4 { type wall; nFaces 100; startFace 79250; } Can anybody help me ? |
|
November 20, 2012, 10:28 |
|
#11 |
Member
Join Date: May 2012
Posts: 55
Rep Power: 15 |
Hej miles,
thank you for your instructions. It also works for gmshToFoam! |
|
November 28, 2016, 08:11 |
|
#12 |
Member
Ramin
Join Date: Oct 2015
Posts: 33
Rep Power: 11 |
hi
this error is because of false hex assigning focus on choosing points in hex selection for example : hex ( 0 1 2 3 4 5 6 7) direction between 0 to 1 in all of hexes should be the same( e.g x axis) direction between 1 to 2 in all of hexes should be the same (e.g y axis) or we can say that you should use "right hand low" in assigning your hexes. Best wishes Ramin |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Natural convection in a closed domain STILL NEEDING help! | Yr0gErG | FLUENT | 4 | December 2, 2019 01:04 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
Multiphase simulation of bubble rising | Niru | CFX | 5 | November 25, 2014 14:57 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |
Gambit tutorial for Multiple Fluid Zones ? | bete | FLUENT | 1 | July 9, 2001 04:32 |