|
[Sponsors] |
[snappyHexMesh] not able to use both snappyHexMesh and setFields utilities together |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 22, 2015, 11:44 |
not able to use both snappyHexMesh and setFields utilities together
|
#1 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi Foamers;
Good day. Back with some problem. I try to use the interFOAM solver to analyse the behaviour of flow for different Ca(capillary) numbers in a homogeneous porous medium. I created homogeneous circular pores using 'Blender' and had success in creating the required model domain. (Figure 1). Then I try to use a setField utility to have an oil phase which is to be injected from the top of the model and I fail to create it. I end up with the same snappyHexMesh developed and the setFields values are not generated over the porous medium. I would like to have something like in figure 2 (note don't bother about the phase names I interchange oil and air upon convenience), but with snappyhexmesh implemented onto it. Additionally when I run setFields after running the snappyhexmesh I get the following though I have the specified file. --> FOAM Warning : From function void setCellFieldType(const fvMesh& mesh, const labelList& selectedCells,Istream& fieldValueStream) in file setFields.C at line 124 Field alpha.air not found Setting field region values Adding cells with center within boxes 1((-0.25 7.865 -0.55) (7.85 8.125 0.55)) --> FOAM Warning : From function void setCellFieldType(const fvMesh& mesh, const labelList& selectedCells,Istream& fieldValueStream) in file setFields.C at line 124 Field alpha.air not found In short, I am not able to use both snappyHexMesh and setFields utilities together. Any help please!! |
|
May 22, 2015, 23:05 |
|
#2 | |
Senior Member
|
Saideep,
Quote:
snappyHexMesh creates a mesh. No field data. A user prepares initial and boundary conditions. setFields modifies field data. setFields does not create field data files. |
||
May 23, 2015, 05:21 |
|
#3 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
hi Sinji;
Many thanks for your reply. Actually I do have the alpa.air file in the 0 time directory. For reference you can see the second figure posted in the first tread, where there is oil at the top. So, what snappyhexmesh does is to mesh the required shape and creates that model domain in an other time directory in my case formed as 0.0002. Now i tried to copy all the 0(initial/ boundary condition) files into the newly created time step, but that too was not successful. I am able to use both setFields and snappyexmes independently and when i try to use one after the other i only get the snappyhexmesh model. Any ideas? Saideep |
|
May 24, 2015, 21:01 |
|
#5 |
Senior Member
|
wyldckat,
Thank you for your quick answer, and thank you very much for your tremendous contributions for the community. Sideep, If you have already checked your mesh from snappyHexMesh, you can do snappyHexMesh with overwrite option as wyldckat shown. With this option, you just get a mesh without other time directories. If you want use the mesh you have already created with snappyHexMesh, copy files in polymesh directory of the latest time (0.0002, maybe) into constant/polyMesh. Then, delete unnecessary time directories which was made by snappyHexMesh. |
|
May 25, 2015, 07:23 |
|
#6 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Thanks a lot Bruno and snak for your help this far!! I feel I am making some sort of progress to what I need. Always a pleasure to read and implement your suggestions.
Now as per your advise, I used the snappyHexMesh- overwrite and the data regarding the new mesh is copied to the 0 file {good so far}. Problem 1: Within the snappyHexMesh dictionary, I include the name of my (.stl) file and name it(my case as fixedWalls). geometry { lunati.stl { type triSurfaceMesh; name fixedWalls; } But when I run the snappyHexMesh -overwrite and later the setFields I get an error related to the boundary name of the .stl stating: "--> FOAM FATAL IO ERROR: Cannot find patchField entry for fixedWalls". But why do I include the .stl file name within my blockMesh. Well, do I need to include it in my blockMesh Dict and 0 (U/p) files. In several examples I followed the name of the .stl file was never specified within their 0/ blockMeshDict files. Problem 2: The number of cells are not equal and I can understand this as snappyHexMesh removes several cells it is not consistent anymore. I guess the correct pattern flow of using blockMesh -> snappyHexMesh -> setFields would correct this. I would like to post my file here but the .stl file size is quite heavy even after compressing it exceeds the limit. Sorry for that!! -Saideep |
|
May 25, 2015, 07:46 |
|
#7 | |
Senior Member
|
Saideep,
Quote:
Information about the mesh is not stored in the 0 directory. It is in the constant/polyMesh directory. You have to prepare files in the 0 directory. You have to write down your boundary conditions in files in the 0 directory. Do your files have fixedWalls entry for boundary condition? Starting with small and simple example is good practice. You would grasp what you did and what you get easily. and you can share case files. |
||
May 25, 2015, 07:58 |
|
#8 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Thanks a lot Bruno and Snak.
Well I finally succeed after a long fight. Actually the missing things and procedure mentioned in the above post were the cause for the delay in success. At last correction of the above 2 problems gave me what I required. Just attached the final image. Will get back to you guys soon!!! Another small comment seeing this post: If you use the snappyHexMesh -overwrite, and by any chance you need to re run the snappyhexmesh it gives an error. Just go back to the polyMesh file and delete all dictionaries except the required 'blockMeshDict'. {saves some time!!} -Saideep |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Running parallel case after parallel meshing with snappyHexMesh? | Adam Persson | OpenFOAM Running, Solving & CFD | 0 | August 31, 2015 22:04 |
setFields after snappyHexMesh | mo.houssami | OpenFOAM Pre-Processing | 4 | May 13, 2015 11:44 |
[snappyHexMesh] Able to run snappyHexMesh in parallel on local machine but unable to run on linux clu | abhinav2601 | OpenFOAM Meshing & Mesh Conversion | 1 | January 26, 2015 05:42 |
Setfields inoutlet and water and air patches | erik023 | OpenFOAM Pre-Processing | 1 | September 29, 2008 10:05 |