CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (http://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   extrude2DMesh does not work ! (http://www.cfd-online.com/Forums/openfoam-meshing/120380-extrude2dmesh-does-not-work.html)

ooo July 5, 2013 10:12

extrude2DMesh does not work !
 
Hi

I've converted a 2d mesh from a commercial software to openfoam and now i want to convert it to a 3d mesh(2d with 1 layer in z direction).
I did the same correctly some months ago with openfoam 2.1 but now for 2.2 it does not work.
When i use the command " extrude2DMesh 0.01" i get the error :
----------------------------------------
--> FOAM FATAL ERROR:
0.01 not found in table. Valid entries:
2
(
MeshedSurface
polyMesh2D
)


From function HashTable<T, Key, Hash>::operator[](const Key&) const

-----------------------------------------
I used all formats e.g extrude2DMesh '0.01' and .... but none of the work.
I would appreciate any idea.

l_r_mcglashan July 5, 2013 10:40

You need this dictionary in your system/ folder:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.x                                  |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version        2.0;
    format          ascii;
    class          dictionary;
    object          extrude2DMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

extrudeModel        linearDirection;

patchType          empty;

nLayers            1;

expansionRatio      1.0;

linearDirectionCoeffs
{
    direction      (0 0 1);
    thickness      0.01;
}

and run either:

extrude2DMesh MeshedSurface

or

extrude2DMesh polyMesh2D

Depending on whether your initial mesh is a meshed surface or a 2D polyMesh

ooo July 5, 2013 11:06

Quote:

Originally Posted by l_r_mcglashan (Post 438016)
You need this dictionary in your system/ folder:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.x                                  |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version        2.0;
    format          ascii;
    class          dictionary;
    object          extrude2DMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

extrudeModel        linearDirection;

patchType          empty;

nLayers            1;

expansionRatio      1.0;

linearDirectionCoeffs
{
    direction      (0 0 1);
    thickness      0.01;
}

and run either:

extrude2DMesh MeshedSurface

or

extrude2DMesh polyMesh2D

Depending on whether your initial mesh is a meshed surface or a 2D polyMesh

Thank you for your answer.
Would you please tell me how i should compile this code into my system folder?
Also , This is because of the new version of openFoam?because in the previous version i just used extrude2DMesh command.
Thank you in advance.

l_r_mcglashan July 5, 2013 11:19

You don't compile anything, just put that in the system/ folder of your case directory.

Yes, extrude2DMesh changed to include more functionality.


All times are GMT -4. The time now is 15:01.