View Issue Details

IDProjectCategoryView StatusLast Update
0001140OpenFOAM[All Projects] Bugpublic2015-02-16 21:49
Reporteruser331Assigned Tohenry 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version12.04 LTS
Product Version 
Fixed in Version 
Summary0001140: pointFields are not mapped properly when using dynamic refinement
DescriptionThis is similar to the bug in issue 0000837, where mapping of the pointField pointMotionU fails after a refinement. It was fixed and running in 2.1.x, but appears to be broken again in 2.2.x (I've been focused on other issues and only just discovered this).

I know it is the point field because then I reverse the operations (move first then refine), the current timestep finished computation but crashed when it comes time to write out the fields, whereas when refinement is done first the mesh motion dies immediately throwing the errors seen in additional information.
Steps To Reproduce1. Unpack and compile the dynamicFvMesh.tar.gz and sprayDyMFoam.tar.gz library and solver
2. Unpack the aachenBombMoveRefine.tar.gz case and run sprayDyMFoam on it
Additional InformationThis is the error message from the debug version:

Courant Number mean: 0.00126268 max: 0.0939195
deltaT = 1.42038e-05
Time = 7.38857e-05

Selected 18 cells for refinement out of 3025.
Refined from 3025 to 3151 cells.


--> FOAM FATAL ERROR:
Incompatible size before mapping. Field size: 3151 map size: 3025

    From function void MapInternalField<Type, MeshMapper, volMesh>::operator()
(
    Field<Type>& field,
    const MeshMapper& mapper
) const
    in file lnInclude/MapFvVolField.H at line 73.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/printStack.C:221
#1 Foam::error::abort() at ~/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/error.C:249
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) at ~/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/errorManip.H:85
#3 Foam::MapInternalField<double, Foam::fvMeshMapper, Foam::volMesh>::operator()(Foam::Field<double>&, Foam::fvMeshMapper const&) const at ~/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/MapFvVolField.H:78
#4 void Foam::MapGeometricFields<double, Foam::fvPatchField, Foam::fvMeshMapper, Foam::volMesh>(Foam::fvMeshMapper const&) at ~/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/MapGeometricFields.H:135
#5 Foam::fvMesh::mapFields(Foam::mapPolyMesh const&) at ~/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/fvMesh/fvMesh.C:563
#6 Foam::fvMesh::updateMesh(Foam::mapPolyMesh const&) at ~/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/fvMesh/fvMesh.C:805
#7 Foam::dynamicMotionSolverRefineFvMesh::update() at ~/OpenFOAM/WPT_repo/WestportOF-2.2.x/src/dynamicFvMesh/dynamicMotionSolverRefineFvMesh/dynamicMotionSolverRefineFvMesh.C:1252
#8
 at ~/OpenFOAM/WPT_repo/WestportOF-2.2.x/applications/solvers/lagrangian/sprayDyMFoam/sprayDyMFoam.C:87
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
 in "/home/gandalf/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPDebug/bin/sprayDyMFoam"
Aborted (core dumped)
TagsNo tags attached.

Activities

user331

2014-01-25 00:15

 

dynamicFvMesh.tar.gz (13,070 bytes)

user331

2014-01-25 00:17

 

sprayDyMFoam-bugReport.tar.gz (10,779 bytes)

user331

2014-01-25 00:17

 

aachenBombMoveRefine.tar.gz (6,792 bytes)

user331

2014-01-27 18:35

  ~0002786

Sorry, the bug I was previously referring to is 0000638, not 0000837

user331

2014-01-27 22:45

  ~0002787

Further confirmation that the pointMotionU field is not mapped is found by turning on the polyMesh debug switch:

Courant Number mean: 0.00126268 max: 0.0939195
deltaT = 1.42038e-05
Time = 7.38857e-05

Selected 18 cells for refinement out of 3025.
void polyMesh::clearAddressing() : clearing topology
meshObject::clear(objectRegistry&) : destroying pointMesh
void polyMesh::setInstance(const fileName& inst) : Resetting file instance to "7.38857e-05"
void polyMesh::initMesh() : initialising primitiveMesh
polyMesh::globalData() const : Constructing parallelData from processor topology
This needs the patch faces to be correctly matched
Refined from 3025 to 3151 cells.
void polyMesh::updateMesh(const mapPolyMesh&) : updating addressing and (optional) pointMesh/pointFields
void polyMesh::setInstance(const fileName& inst) : Resetting file instance to "7.38857e-05"
meshObject::clear(objectRegistry&) : destroying volPointInterpolation
Mapping volScalarField PaSR::kappa
Mapping volScalarField thermo:mu
Mapping volScalarField H2O_0
Mapping volScalarField thermo:psi
Mapping volScalarField N2
Mapping volScalarField epsilon_0
Mapping volScalarField K
Mapping volScalarField K_0
Mapping volScalarField CO2_0
Mapping volScalarField h
Mapping volScalarField rho
Mapping volScalarField CO2
Mapping volScalarField k
Mapping volScalarField h_0
Mapping volScalarField O2
Mapping volScalarField C7H16_0
Mapping volScalarField dpdt
Mapping volScalarField O2_0
Mapping volScalarField thermo:psi_0
Mapping volScalarField alphat
Mapping volScalarField dQ
Mapping volScalarField p
Mapping volScalarField rho_0
Mapping volScalarField T
Mapping volScalarField C7H16
Mapping volScalarField k_0
Mapping volScalarField p_0
Mapping volScalarField mut
Mapping volScalarField H2O
Mapping volScalarField cellMotionUy
Mapping volScalarField epsilon
Mapping volScalarField thermo:alpha
Mapping volVectorField U
Mapping volVectorField U_0
Mapping surfaceScalarField faceDiffusivity
Mapping surfaceScalarField phiAbs
Mapping surfaceScalarField phi
Mapping surfaceScalarField phiAbs_0
Mapping surfaceScalarField meshPhi
Mapping surfaceScalarField meshPhi_0
Mapping volScalarField::DimensionedInternalField RR.N2
Mapping volScalarField::DimensionedInternalField sprayCloud:hsTrans
Mapping volScalarField::DimensionedInternalField sprayCloud:rhoTrans_N2
Mapping volScalarField::DimensionedInternalField RR.H2O
Mapping volScalarField::DimensionedInternalField sprayCloud:UCoeff
Mapping volScalarField::DimensionedInternalField sprayCloud:rhoTrans_H2O
Mapping volScalarField::DimensionedInternalField deltaTChem
Mapping volScalarField::DimensionedInternalField RR.O2
Mapping volScalarField::DimensionedInternalField sprayCloud:rhoTrans_O2
Mapping volScalarField::DimensionedInternalField sprayCloud:hsCoeff
Mapping volScalarField::DimensionedInternalField RR.C7H16
Mapping volScalarField::DimensionedInternalField sprayCloud:rhoTrans_C7H16
Mapping volScalarField::DimensionedInternalField RR.CO2
Mapping volScalarField::DimensionedInternalField sprayCloud:rhoTrans_CO2
Mapping volVectorField::DimensionedInternalField sprayCloud:UTrans
Mapping cloud sprayCloud
--> FOAM Warning :
    From function const labelList& polyMesh::tetBasePtIs() const
    in file meshes/polyMesh/polyMesh.C at line 867
    Tet base point indices not available. Forcing storage of base points.
void polyMesh::updateMesh(const mapPolyMesh&) : updating addressing and (optional) pointMesh/pointFields
void polyMesh::setInstance(const fileName& inst) : Resetting file instance to "7.38857e-05"
Mapping volScalarField PaSR::kappa


--> FOAM FATAL ERROR:
Incompatible size before mapping. Field size: 3151 map size: 3025

    From function void MapInternalField<Type, MeshMapper, volMesh>::operator()
(
    Field<Type>& field,
    const MeshMapper& mapper
) const
    in file lnInclude/MapFvVolField.H at line 73.

user331

2014-02-26 23:21

  ~0002909

Note that the mapping issue can be fixed by moving the call

meshObject::clear<polyMesh, GeometricMeshObject>(*this)

out of clearGeom and clearAdressing and put it inside of clearOut (these functions are in the polyMeshClear.C file in $FOAM_SRC/OpenFOAM/meshes.

There are still problems with the courant number after mapping, but at least it happens.

henry

2015-02-15 18:39

manager   ~0003788

Could you test this with OpenFOAM-2.3.x and/or OpenFOAM-dev?

user331

2015-02-16 21:44

  ~0003804

This works in 2.3.x

henry

2015-02-16 21:49

manager   ~0003805

I expected it would, thanks for checking.

Issue History

Date Modified Username Field Change
2014-01-25 00:15 user331 New Issue
2014-01-25 00:15 user331 File Added: dynamicFvMesh.tar.gz
2014-01-25 00:17 user331 File Added: sprayDyMFoam-bugReport.tar.gz
2014-01-25 00:17 user331 File Added: aachenBombMoveRefine.tar.gz
2014-01-27 18:35 user331 Note Added: 0002786
2014-01-27 22:45 user331 Note Added: 0002787
2014-02-26 23:21 user331 Note Added: 0002909
2015-02-15 18:39 henry Note Added: 0003788
2015-02-16 21:44 user331 Note Added: 0003804
2015-02-16 21:49 henry Note Added: 0003805
2015-02-16 21:49 henry Status new => resolved
2015-02-16 21:49 henry Resolution open => fixed
2015-02-16 21:49 henry Assigned To => henry