CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   Do only one snappyHexMesh stage (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/129233-do-only-one-snappyhexmesh-stage.html)

Tensian January 31, 2014 09:00

Do only one snappyHexMesh stage
 
Hi,

A very simple question. Sometimes I use snappyHexMesh with addLayers option equal to false, because I am only interested in snapping.

If later I want to do only addLayer phase with the previous result obtained from snap (I have 1 folder from castellated and 2 folder from snap), I set addLayers equal to true and the others to false, but in this way snappy does nothing (in 10 seconds it has finished).

Does anybody know how to do only the addLayers stage if you have previously done the two first steps? I am wasting a lot of meshing time doing the three phases in every mesh...

Thanks people!

Ruli January 31, 2014 17:53

Dear Tensian,
a log of snappy would be helpful.
Anyway, just a guess: Is your startFrom entry in controlDict startTime?

Best regards
Julian

Tensian February 2, 2014 10:19

Hi jJulian and thanks for your reply,

In my first try, I was writting this:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location system;
object snappyHexMeshDict;
}

castellatedMesh true;
snap true;
addLayers false;

Then I ran snappy. When it has finished (I have now 1 and 2 folders corresponding to castellated and snapped phase), I changed to:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location system;
object snappyHexMeshDict;
}

castellatedMesh false;
snap false;
addLayers true;

and I execute snappy again but nothing is done.

Following your suggestion, I tried the same but I changed in controlDict:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application snappyHexMesh; ///previously I have here the name of the solver for ///simulation

startFrom startTime;
startTime 2; //this means snappy will start from the mesh located at folder "2"?
stopAt endTime;
endTime 3; ////this means snappy will finish when addLayers step writes the
"3" folder?
deltaT 1;
writeControl timeStep;
writeInterval 50;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;

I am wainting yet but I guess this should work fine. What do you think? I thought that controlDict was only related with execution, not with meshing...

Best regards,

Tensian

Ruli February 2, 2014 13:54

Quote:

Originally Posted by Tensian (Post 472980)
Following your suggestion, I tried the same but I changed in controlDict:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application snappyHexMesh; ///previously I have here the name of the solver for ///simulation

startFrom startTime;
startTime 2; //this means snappy will start from the mesh located at folder "2"?
stopAt endTime;
endTime 3; ////this means snappy will finish when addLayers step writes the
"3" folder?
deltaT 1;
writeControl timeStep;
writeInterval 50;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;

I am wainting yet but I guess this should work fine. What do you think? I thought that controlDict was only related with execution, not with meshing

Hi Tensian,
I am not absolutely sure if controlDict also controls snappy, just was a guess. I would keep it on startTime "latestTime" and application "SOLVER".

How does your snappyHexMeshDict look like?

By the way, the use of
Code:

Code Markers
makes it easier to read it ;)

Best regards
Julian


All times are GMT -4. The time now is 07:09.