CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

Generating nonuniform meshes with sizefunction

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 16, 2009, 04:21
Default
  #21
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 7
johndeas is on a distinguished road
I modified the end of my code this way:

Code:
mesh.movePoints(points);

runTime.functionObjects().off();

runTime++;

mesh.write();
And I don't have errors related to fieldAverage anymore. A new time directory is created, but, only points are exported, not the full mesh with boundaries, owners, neighbours, etc... which doesn't make all this very useful.
johndeas is offline   Reply With Quote

Old   July 16, 2009, 05:49
Default
  #22
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 7
johndeas is on a distinguished road
I tried to understand a little how all this work.

In an fvMesh, the write() method is a reimplementation of the virtual write() inherited from polyMesh, itself inherited from objectRegistry (and itself from regIOobject).

But, when fvMesh::write() is called, the following code is executed

Code:
bool fvMesh::write() const
{
    return polyMesh::write();
}
and thus the regIOobject::write() is called, in the end.

The problem in my case is that the only written file is points.

When the fvMesh mesh is created, with

Code:
Foam::fvMesh mesh
(
    Foam::IOobject
    (
     Foam::fvMesh::defaultRegion,
     runTime.timeName(),
     runTime,
     Foam::IOobject::MUST_READ
    )
);
the IOobject provided is used by the inherited constructor of polyMesh, which creates the faces_, owner_, etc... each with their own IOobject, and registering all them on the fvMesh object. I don't see where is the difference of treatment, and why only the "points" file is exported.

Plus, if I try a

Code:
mesh.names()
I get:
Code:
11
(
cellZones
fvSolution
meshPhi
points
neighbour
faces
faceZones
fvSchemes
pointZones
boundary
owner
)
Which made me expect to find those files in the time directory.

Last edited by johndeas; July 16, 2009 at 06:10.
johndeas is offline   Reply With Quote

Old   July 19, 2009, 13:10
Default
  #23
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Braunschweig, Niedersachsen, Germany
Posts: 273
Rep Power: 8
henrik is on a distinguished road
John,

it's all about saving disk space.

When OF write a mesh, it only saves data that has changed after the last dump. On read OF goes backwards through the time dumps and collects the necessary data.

All what you have to do in order to obtain a "normal" mesh is to copy 1/polyMesh/points into constant/polyMesh and delete the "1" time directory.

Henrik
henrik is offline   Reply With Quote

Old   July 19, 2009, 13:52
Default
  #24
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 7
johndeas is on a distinguished road
Thank you for the information !

Well rewriting the whole polyMesh forced me to dive a little into OF structure which wasn't a bad thing, after all
johndeas is offline   Reply With Quote

Old   July 20, 2009, 04:36
Default
  #25
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 7
johndeas is on a distinguished road
Something that might be attractive (my 2 cents...) would be to have the same kind of rule for field reading. If I apply a preprocess on the mesh, which outputs to other time directories, the process of field reading would detect and use the latest version so I don't have to manually copy everything on the last time directory.
johndeas is offline   Reply With Quote

Old   March 26, 2010, 04:58
Default hyperbolic mesh
  #26
New Member
 
guillaume maurice
Join Date: Mar 2010
Posts: 4
Rep Power: 6
guillaumem is on a distinguished road
Hi
I am also performing LES on channel flow and i would like to use ane hyperbolic mesh does someone has some know how to do that how to implement the routine in the code
guillaumem is offline   Reply With Quote

Old   April 11, 2010, 05:01
Default
  #27
New Member
 
Bertrand Delvaux
Join Date: Apr 2010
Posts: 29
Rep Power: 6
Bertrand is on a distinguished road
Hello Alberto,

I am very new to OF and would like to know if it is possible for you to send me your code about "hyperbolic" (or any other analytical function" meshing? Because I would like to implement it on a variable cross-sectional cylinder, with the number of cells depending on the radius, for instance...

Thank you very much!

Best,

Bertrand
Bertrand is offline   Reply With Quote

Old   April 18, 2012, 03:53
Default final code
  #28
Member
 
Lev
Join Date: Dec 2010
Posts: 31
Rep Power: 5
levka is on a distinguished road
Hello guys,
could you please upload final working code...
levka is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Specifying nonuniform boundary condition maka OpenFOAM Running, Solving & CFD 56 February 13, 2014 07:08
Import or generating Meshes from Koordinates Gau%c3%9fKr%c3%bcger toby OpenFOAM Mesh Utilities 7 February 27, 2009 15:25
Specifying nonuniform initial condition msyaml OpenFOAM Running, Solving & CFD 61 January 20, 2009 14:05
FixedValue nonuniform BC dmoroian OpenFOAM Running, Solving & CFD 1 November 3, 2006 04:26
Generating big meshes with GAMBIT on NT Andrew Ooi FLUENT 12 February 2, 2000 22:26


All times are GMT -4. The time now is 16:14.