CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to deal with new added cells

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 5, 2005, 22:54
Default If a new cell is added in the
  #1
chen_jun
Guest
 
Posts: n/a
If a new cell is added in the fvMesh, what should I do to set the cell value (such as pressure and velocity) for transient calculation?

Here is the error I have got:

--> FOAM FATAL ERROR : internal field size 2504 does not match
the number of points 5474
the number of internal faces 4864
or the number of cells 2502

From function fvPatchField<type>::checkInternalField() const
in file /home/chenjun/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPatchField.C at line 67.

FOAM aborting
  Reply With Quote

Old   October 6, 2005, 16:18
Default This is from using mapFields?
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
This is from using mapFields? Check how you invoke mapFields. There is a tutorial which uses it.
mattijs is offline   Reply With Quote

Old   October 6, 2005, 23:33
Default This is from icoFoam, which I
  #3
chen_jun
Guest
 
Posts: n/a
This is from icoFoam, which I have modified to change mesh in runtime.
I also want to know how volFields know their old value if the cell have been changed. Using mapField?
  Reply With Quote

Old   October 7, 2005, 05:24
Default If you wish to add a new cell
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
If you wish to add a new cell into the mesh during the simulation, you are really executing a topological change: as a consequence, the mesh numbering will probably change as well.

When the data is copied from one mesh to another using topo change support in OpenFOAM, simple data mapping will not do: we work out the detailed mapping between the old and new mesh and enforce consistency and conservation. In short, the data mapping process creates on object of type mapPolyMesh which contains the mapping info. Then, each discretisation executes the appropriate mapping based on this info, e.g. in fvMesh:

// Map all the volFields in the objectRegistry
MapGeometricFields<scalar,>(mapper);
MapGeometricFields<vector,>(mapper);
MapGeometricFields<tensor,>(mapper);

// Map all the surfaceFields in the objectRegistry
MapGeometricFields<scalar,>(mapper);
MapGeometricFields<vector,>(mapper);
MapGeometricFields<tensor,>(mapper);

// Map all the clouds in the objectRegistry
mapClouds(*this, meshMap);

which moves the stuff from the old mesh to the new one.

Enjoy,

Hrv
mm.abdollahzadeh and hua1015 like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can Temperature be added into interFoam ttdtud OpenFOAM Running, Solving & CFD 14 September 7, 2013 08:32
help:uds source added to boundary cells FredPacheo FLUENT 5 September 5, 2008 06:45
added mass Kuba Broniszewski FLUENT 2 February 23, 2007 10:39
How to deal with "dummy" cells by FVM Smith Gearheart Main CFD Forum 7 November 15, 2002 01:35
Effect of added CPU ? steve podleski Main CFD Forum 8 August 10, 1999 21:26


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