CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to deal with new added cells (http://www.cfd-online.com/Forums/openfoam-solving/60467-how-deal-new-added-cells.html)

chen_jun October 5, 2005 21:54

If a new cell is added in the
 
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

mattijs October 6, 2005 15:18

This is from using mapFields?
 
This is from using mapFields? Check how you invoke mapFields. There is a tutorial which uses it.

chen_jun October 6, 2005 22:33

This is from icoFoam, which I
 
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?

hjasak October 7, 2005 04:24

If you wish to add a new cell
 
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


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