|
[Sponsors] |
November 28, 2022, 08:23 |
|
#21 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,206
Rep Power: 28 |
Hi,
In snappyHexMeshDict, you need to define the porous cylinder as a cellZone in the refinementSurfaces section: Code:
refinementSurfaces { yourCylinder { level (0 0); faceZone cylinderFaces; cellZone cylinderVolume; cellZoneInside inside; } } Yann |
|
November 28, 2022, 10:46 |
|
#22 | |
New Member
|
Quote:
For your reference i am attaching my case set up. It would be great if you can tell me my mistake. I have tried the approach suggested by you. Regards https://drive.google.com/drive/folde...usp=share_link Last edited by Rohitsingh; November 28, 2022 at 10:53. Reason: File attachment |
||
November 28, 2022, 11:39 |
|
#23 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,206
Rep Power: 28 |
You should have a stl file defined in geometry. I'm going to assume you stl file is named "poroussphere.stl":
Code:
geometry { poroussphere.stl { type triSurfaceMesh; name Interface; } refinementBox { type searchableBox; min (-4 -4 -4); max (4 4 4); } }; Code:
Interface { level (0 0); faceZone anyNameYouWant; cellZone anyOtherNameYouWant; cellZoneInside inside; } Yann PS: as your question is pretty specific, you might want to create a dedicated thread to discuss it. |
|
January 16, 2023, 06:42 |
Problem with extrudeMesh
|
#24 |
New Member
Giuseppe Dalla Vecchia
Join Date: Jan 2023
Posts: 6
Rep Power: 3 |
Hi, I'm new on this forum. I have to do an university exams and i have a problem with the function extrudeMesh. When I compile I have a FATALERROR:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM Warning : From virtual Foam::Istream &Foam::ISstream::read(Foam::word &) in file db/IOstreams/Sstreams/ISstream.C at line 886 Reading "system/controlDict" at line 51 Missing 1 closing ')' while parsing residuals(p, --> FOAM Warning : From static bool Foam::functionObjectList::readFunctionObject(const Foam::string &, Foam::dictionary &, HashSet<Foam::wordRe> &, const Foam::word &) in file db/functionObjects/functionObjectList/functionObjectList.C at line 288 Cannot find functionObject file residuals --> FOAM Warning : Reading "system/controlDict" at line 51 Too many closing ')' ... was a ';' forgotten? --> FOAM FATAL IO ERROR: (openfoam-2212) Unexpected '}' while reading dictionary entry file: system/controlDict at line 64. From static bool Foam::entry::New(Foam::dictionary &, Foam::Istream &, const entry::inputMode, const int) in file db/dictionary/entry/entryIO.C at line 156. FOAM exiting someone can help me? Thanks |
|
January 16, 2023, 07:12 |
|
#25 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,206
Rep Power: 28 |
Hello,
There are likely typos in your controlDict: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM Warning : From virtual Foam::Istream &Foam::ISstream::read(Foam::word &) in file db/IOstreams/Sstreams/ISstream.C at line 886 Reading "system/controlDict" at line 51 Missing 1 closing ')' while parsing residuals(p, --> FOAM Warning : From static bool Foam::functionObjectList::readFunctionObject(const Foam::string &, Foam::dictionary &, HashSet<Foam::wordRe> &, const Foam::word &) in file db/functionObjects/functionObjectList/functionObjectList.C at line 288 Cannot find functionObject file residuals --> FOAM Warning : Reading "system/controlDict" at line 51 Too many closing ')' ... was a ';' forgotten? [...] Regards, Yann |
|
January 16, 2023, 07:18 |
|
#26 |
New Member
Giuseppe Dalla Vecchia
Join Date: Jan 2023
Posts: 6
Rep Power: 3 |
Yann, thanks for your help.
I needed to add a Func for WallShearStress so now i put that for controlDict: FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application simpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 3000; deltaT 1; writeControl runTime; writeInterval 3000; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { #includeFunc residuals(p, U, k, omega) #includeFunc "wallShearStress" forces { type forces; libs ("libforces.so"); writeControl timeStep; writeInterval 1; log yes; patches (wing); rho rhoInf; rhoInf 1; CofR (0.4974612746 -0.01671895744 0.125); } } and the error now is: Create time --> FOAM Warning : From virtual Foam::Istream &Foam::ISstream::read(Foam::word &) in file db/IOstreams/Sstreams/ISstream.C at line 886 Reading "system/controlDict" at line 51 Missing 1 closing ')' while parsing residuals(p, --> FOAM Warning : From static bool Foam::functionObjectList::readFunctionObject(const Foam::string &, Foam::dictionary &, HashSet<Foam::wordRe> &, const Foam::word &) in file db/functionObjects/functionObjectList/functionObjectList.C at line 288 Cannot find functionObject file residuals --> FOAM Warning : Reading "system/controlDict" at line 51 Too many closing ')' ... was a ';' forgotten? --> FOAM FATAL ERROR: (openfoam-2212) Unknown functionEntry 'includeFunc' in "system/controlDict" near line 53 Valid functionEntries : 10(calc codeStream eval include includeEtc includeIfPresent message sinclude sincludeEtc word) From static bool Foam::functionEntry::execute(const Foam::word &, const Foam::dictionary &, Foam:rimitiveEntry &, Foam::Istream &) in file db/dictionary/functionEntries/functionEntry/functionEntry.C at line 161. FOAM exiting Maybe I have to tell you that last week this program worked with Openfoam v10 ... now I have Openfoam v2212 ... maybe it could be usefull for you. Regards, Giuseppe |
|
January 16, 2023, 07:44 |
|
#27 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,206
Rep Power: 28 |
This line seems to be wrong:
Code:
#includeFunc residuals(p, U, k, omega) |
|
January 16, 2023, 07:45 |
|
#28 |
New Member
Giuseppe Dalla Vecchia
Join Date: Jan 2023
Posts: 6
Rep Power: 3 |
Hi,
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } |
|
January 16, 2023, 07:48 |
|
#29 |
New Member
Giuseppe Dalla Vecchia
Join Date: Jan 2023
Posts: 6
Rep Power: 3 |
I chance this line with
#includeFunc residuals(p,U,k,omega) and seems this one error is resolve but still this Create time --> FOAM Warning : From static bool Foam::functionObjectList::readFunctionObject(const Foam::string &, Foam::dictionary &, HashSet<Foam::wordRe> &, const Foam::word &) in file db/functionObjects/functionObjectList/functionObjectList.C at line 288 Cannot find functionObject file residuals --> FOAM FATAL IO ERROR: (openfoam-2212) Unexpected '}' while reading dictionary entry file: system/controlDict at line 67. From static bool Foam::entry::New(Foam::dictionary &, Foam::Istream &, const entry::inputMode, const int) in file db/dictionary/entry/entryIO.C at line 156. FOAM exiting and i check every } missing ... |
|
January 16, 2023, 07:50 |
|
#30 |
New Member
Giuseppe Dalla Vecchia
Join Date: Jan 2023
Posts: 6
Rep Power: 3 |
It's strange because when i run one line like "extrudeMesh" i see that:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2212 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ So v2212, but when i open controlDict it's: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ v1812 .... it could be this the error? |
|
January 16, 2023, 09:19 |
|
#31 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,206
Rep Power: 28 |
OK so first thing: you are using openFoam-v2212, as you can see here:
Code:
--> FOAM FATAL IO ERROR: (openfoam-2212) Unexpected '}' while reading dictionary entry file: system/controlDict at line 67. From static bool Foam::entry::New(Foam::dictionary &, Foam::Istream &, const entry::inputMode, const int) in file db/dictionary/entry/entryIO.C at line 156. FOAM exiting The files header not being up to date don't matter, but you might face issues if you try to run cases from an older version to a new one due to syntax or functionalities changes between versions. This being said, the residuals function object has been replaced by solverInfo since v1906 so you should replace this: Code:
#includeFunc residuals(p, U, k, omega) Code:
#includeFunc solverInfo Regards, Yann |
|
January 16, 2023, 10:03 |
|
#32 |
New Member
Giuseppe Dalla Vecchia
Join Date: Jan 2023
Posts: 6
Rep Power: 3 |
Yann, you're a lifesaver.
So the problem was this line #includeFunc residuals(p, U, k, omega) that change with the new version of Openfoam. I changed with the new line and now it work all well and print me all the dates that i need. Thank you so much for the help. Regards, Giuseppe |
|
May 18, 2023, 04:23 |
|
#33 |
New Member
Alexandros
Join Date: Oct 2016
Posts: 21
Rep Power: 10 |
Dear All,
Could you please provide some advice on better snapping the interface in the picture below! It comes from a temperature probe that I need to put within the fluid pipe flow. All the procedure described by Tobi for a watertight etc. outline geometry has been followed -although meshing at the interface nodes is indeed compatible - it seems not so uniform enough I admit (please check salome file). In the final output a small number of cells are included in opposite zones, e.g fluid/probeWall or probe/fluidWall. I saw that in other versions (I am finally using OF 9 now in Ubunti 22.04 lts under wsl win 11) there are several tricks like "stealing" the problematic cells from one zone to another -so that boundary files are consistent with the supposed geometry the physical problem but I would be very happy to avoid it and have a better cell treatment. My questions are summarized below: 1) How stiff should be a mesh produced by salome in order to avoid "bad or scratched" cells at the interface? Is it adequate that nodes "communicate" or the mesh just behind the interface play a role also? 2) How exactly the combination of the settings work in snappy? (I have gone through Tobi's excellent video series with smoking pipe but I am still confused; perhaps this is my problem, but still some simple rules and guidelines would be very helpful 3) Does this problem has a solution or I am hitting my head to the wall? Case files can be downloaded from here: https://drive.google.com/file/d/1-DA...usp=share_link I think the next step is the edge refinement example (available in Holzmann CFD page). But is there an accompanying pdf for this one? I still cannot undestand how that line was constructed (it does not appear but only in paraview in my case) and also, what is the logic behind this moderate number of steps before exporting the stl files. Finally, does someone needs the blender file as well in order to check how the refinement edge is produced?) Thank you for your time and your awesome work! Alex |
|
May 18, 2023, 09:53 |
|
#34 |
New Member
Alexandros
Join Date: Oct 2016
Posts: 21
Rep Power: 10 |
Before any response, I would like to post a link to another excellent video for mesh refinement.
https://holzmann-cfd.com/community/t...haust-manifold Maybe I should look better before bothering you... All the best ! |
|
July 12, 2023, 05:39 |
Adding layers to interior stls of multiregion meshes in snappyHexMesh
|
#35 | |
New Member
Hossein Sheikhshoaie
Join Date: Sep 2022
Posts: 6
Rep Power: 4 |
Dear Foamers,
I'm currently struggling with snappyHexMesh and creating layers on the interior boundary layers of a multiregion mesh, I need to set 30 < y+ < 300. I've tried adjusting various parameters, but so far, I haven't been successful. I was wondering if you could offer any suggestions. The snappyHexMeshDict is observable below: Quote:
Also, I have attached a screenshot from Paraview. Thank you in advance, and please let me know if you need any additional information. |
||
July 14, 2023, 05:45 |
|
#36 |
New Member
Alexandros
Join Date: Oct 2016
Posts: 21
Rep Power: 10 |
I think that there is an openfoam tutorial withinh the folder tutorials snappy for meshing a pipe. You could start with that.
In addition, there is a (more complicated) pipe meshing tutorial in Tobias Holzmann page. |
|
July 15, 2023, 06:05 |
|
#37 |
New Member
Hossein Sheikhshoaie
Join Date: Sep 2022
Posts: 6
Rep Power: 4 |
Thank you dear Alexander;
I've already checked samples. In my opinion this case is different because I can add layers to shell's wall. However, It's impossible to add layer to the interior walls of inner regions. I think the picture was not as clear as enough. So I would like to explain the case further. It involves a shell that surrounds two pipe lines, one in a serpentine shape and the other in a U shape. The mesh used for the simulation is three-dimensional and consists of at least one million cells. I have attached a picture of enclosed regions. I would be grateful for any guidance you can provide. |
|
July 22, 2023, 20:04 |
|
#38 |
New Member
Hossein Sheikhshoaie
Join Date: Sep 2022
Posts: 6
Rep Power: 4 |
Dear Formers,
Finding a way to add a boundary layer mesh to the interior STLs mentioned above is crucial to me. Please let me know if it is impossible to create such parts with snappyHexMesh. I would appreciate it if someone could introduce a better solution, even if it involves using other meshing tools. Thank you in advance. |
|
July 23, 2023, 06:24 |
|
#39 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,206
Rep Power: 28 |
Hello,
The answer depends on the OpenFOAM version you are using. (if you are not sure, you can type the foamVersion command in a terminal) Regards, Yann |
|
July 23, 2023, 18:33 |
|
#40 |
New Member
Hossein Sheikhshoaie
Join Date: Sep 2022
Posts: 6
Rep Power: 4 |
Hi,
Dear Yann, I'm grateful for your prompt response. The mesh has been generated through OpenFOAM 7. I appreciate your help. Thank you again. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[CAD formats] Creating waterproof STL using snappyHexMesh or salome | Tobi | OpenFOAM Meshing & Mesh Conversion | 58 | May 13, 2020 07:01 |
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing | peterhess | OpenFOAM Meshing & Mesh Conversion | 2 | January 3, 2018 03:54 |
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. | jasv | OpenFOAM Meshing & Mesh Conversion | 4 | May 10, 2016 03:55 |
[snappyHexMesh] snappyhexmesh doesn't creat mesh in parallel issue? | klausb | OpenFOAM Meshing & Mesh Conversion | 1 | March 7, 2015 12:55 |
[snappyHexMesh] stitchMesh and snappyHexMesh | gdbaldw | OpenFOAM Meshing & Mesh Conversion | 0 | December 23, 2009 03:09 |