View Issue Details

IDProjectCategoryView StatusLast Update
0001195OpenFOAMBugpublic2015-04-10 21:51
Reporteruser331Assigned Tohenry  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version12.04
Summary0001195: dynamicRefinement update misses meshPhi
DescriptionWhen running a compressible thermodynamic case with dynamic refinement, it appears there are some issue with the mapping. It appears most fields are mapped correctly, but when returning to the solver it complains meshPhi doesn't exist.
Steps To Reproduce1. Download and compile sprayDyMFoam (listed here)
2. Download the aachenBombRefineCase and run sprayDyMFoam on it
Additional InformationHere is the debug log for the crashing timestep, with polyMesh debug enabled:

Courant Number mean: 0.00127301 max: 0.0973354
deltaT = 1.42038e-05
Time = 7.38857e-05

Selected 18 cells for refinement out of 3025.
void polyMesh::clearAddressing() : clearing topology isMeshUpdate:1
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
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"
Mapping pointScalarField pointMotionUy
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 PaSR:kappa
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 phi
Mapping surfaceScalarField phi_0
Mapping surfaceVectorField rhoUf
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 870
    Tet base point indices not available. Forcing storage of base points.
Selected 0 split points out of a possible 18.
DICPCG: Solving for cellMotionUy, Initial residual = 0.00060881, Final residual = 5.2385e-09, No Iterations 32
tmp<scalarField> polyMesh::movePoints(const pointField&) : Moving points for time 7.38857e-05 index 10
bool polyMesh::checkMeshMotion(const pointField&, const bool, const bool) const: checking mesh motion
    Min volume = 1.65053e-09. Max volume = 1.32226e-08. Total volume = 3.99704e-05. Cell volumes OK.
    Minimum face area = 8.26446e-07. Maximum face area = 7.2724e-06. Face area magnitudes OK.
    Face pyramids OK.
bool polyMesh::checkFaceOrthogonality(const bool, labelHashSet*) const: checking mesh non-orthogonality
    Mesh non-orthogonality Max: 38.8222 average: 4.04881
    Non-orthogonality check OK.
Mesh motion check OK.
Mesh topology has changed!
Correcting convective flux for changed mesh
Starting pressure correction
pcorr time
Creating phi
DICPCG: Solving for pcorr, Initial residual = 0.954999, Final residual = 4.4001e-07, No Iterations 28
Mesh Courant Number mean: 0.00236367 max: 0.00354683

Solving 3-D cloud sprayCloud

--> Cloud: sprayCloud injector: model1
    Added 149 new parcels

Cloud: sprayCloud
    Current number of parcels = 505
    Current mass in system = 1.79636e-07
    Linear momentum = (4.372e-08 -2.03952e-05 -8.18451e-08)
   |Linear momentum| = 2.03954e-05
    Linear kinetic energy = 0.00166491
    model1:
        number of parcels added = 541
        mass introduced = 1.93253e-07
    Parcels absorbed into film = 0
    New film detached parcels = 0
    Parcel fate (number, mass)
      - escape = 0, 0
      - stick = 0, 0
    Temperature min/max = 328.516, 540.2
    Mass transfer phase change = 1.36172e-08
    D10, D32, Dmax (mu) = 13.4476, 19.0968, 71.6637
    Liquid penetration 95% mass (m) = 0.00529809

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rhoEqn max/min : 50.4391 21.6701
DILUPBiCG: Solving for Ux, Initial residual = 0.358536, Final residual = 3.45772e-06, No Iterations 4
DILUPBiCG: Solving for Uy, Initial residual = 0.214201, Final residual = 3.44248e-07, No Iterations 5
DILUPBiCG: Solving for Uz, Initial residual = 0.357201, Final residual = 2.97447e-06, No Iterations 4
DILUPBiCG: Solving for C7H16, Initial residual = 0.238519, Final residual = 1.1846e-06, No Iterations 5
DILUPBiCG: Solving for O2, Initial residual = 0.238519, Final residual = 1.90143e-06, No Iterations 5
DILUPBiCG: Solving for CO2, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for H2O, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for h, Initial residual = 0.230328, Final residual = 7.48973e-07, No Iterations 5
T gas min/max = 728.425, 800.616
DICPCG: Solving for p, Initial residual = 0.961668, Final residual = 0.0800968, No Iterations 5
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.00338577, global = 0.00171448, cumulative = 0.0017321
DICPCG: Solving for p, Initial residual = 0.235741, Final residual = 5.76586e-07, No Iterations 22
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.52832e-07, global = -5.27507e-10, cumulative = 0.0017321


--> FOAM FATAL ERROR:
index 3091 out of range 0 ... 3024

    From function UList<T>::checkIndex(const label)
    in file /home/gandalf/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/UListI.H at line 109.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/printStack.C:221
#1 Foam::error::abort() at ~/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/error.C:249
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) at ~/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/errorManip.H:85
#3 Foam::UList<double>::checkIndex(int) const at ~/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/UListI.H:113
#4 Foam::UList<double>::operator[](int) at ~/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/UListI.H:168
#5 Foam::compressible::epsilonWallFunctionFvPatchScalarField::calculate(Foam::compressible::turbulenceModel const&, Foam::List<double> const&, Foam::fvPatch const&, Foam::Field<double>&, Foam::Field<double>&) at ~/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C:240
#6 Foam::compressible::epsilonWallFunctionFvPatchScalarField::calculateTurbulenceFields(Foam::compressible::turbulenceModel const&, Foam::Field<double>&, Foam::Field<double>&) at ~/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C:178
#7 Foam::compressible::epsilonWallFunctionFvPatchScalarField::updateCoeffs() at ~/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C:411
#8 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::updateCoeffs() at ~/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/GeometricBoundaryField.C:478
#9 Foam::compressible::RASModels::kEpsilon::correct() at ~/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C:300
#10
 at ~/OpenFOAM/WPT_repo/WestportOF-2.3.x/applications/solvers/lagrangian/sprayDyMFoam/sprayDyMFoam.C:172
#11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12
 in "/home/gandalf/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPDebug/bin/sprayDyMFoam"
Aborted (core dumped)
TagsNo tags attached.

Activities

user331

2014-02-26 23:48

 

aachenRefine.tar.gz (6,654 bytes)

user331

2014-02-26 23:48

 

sprayDyMFoam.tar.gz (5,962 bytes)

user331

2014-05-06 22:58

  ~0003045

Has any work been done on this bug?

henry

2014-05-18 21:27

manager   ~0003064

There are a few issues with your code and case, in particular the mesh is not moving but movingWallVelocity BC is applied with requires mesh.phi() which is not available. Also the ddtCorr handling is out of date but this is not causing the case to fail. After fixing the code and case I am able to reproduce the error log you supplied which relates to fields in the wall-function BCs not being updated on moving meshes which I have corrected.

Resolved by commit 30947d15717ad74f6e278ae02fe0fac294ef4f99

user331

2014-05-26 18:23

  ~0003083

Thanks for fixing the turbulence models, I can confirm that they now work when adding wall faces. One last question on this issue; what I'm really after is being able to do mesh movement and refining, which still remains a problem. I'm currently moving the mesh first, then refining. The crash happens on the next iteration, when I want to move and correct the flux but it can't find meshPhi anymore. Or is it a simple matter of including meshPhi in the correctedFluxes entry? What should I use as a source field?

henry

2014-05-26 19:30

manager   ~0003084

There were several issues with the code you posted so it would be useful if you could reproduce this issue with a solver we maintain, e.g. rhoPimpleDyMFoam.

user331

2014-05-26 19:38

  ~0003085

Got it. I will post this with the new case as a different issue since the setup will be different. Thanks for the reply!

Issue History

Date Modified Username Field Change
2014-02-26 23:48 user331 New Issue
2014-02-26 23:48 user331 File Added: aachenRefine.tar.gz
2014-02-26 23:48 user331 File Added: sprayDyMFoam.tar.gz
2014-05-06 22:58 user331 Note Added: 0003045
2014-05-18 21:27 henry Note Added: 0003064
2014-05-18 21:27 henry Status new => resolved
2014-05-18 21:27 henry Resolution open => fixed
2014-05-18 21:27 henry Assigned To => henry
2014-05-26 18:23 user331 Note Added: 0003083
2014-05-26 18:23 user331 Status resolved => feedback
2014-05-26 18:23 user331 Resolution fixed => reopened
2014-05-26 19:30 henry Note Added: 0003084
2014-05-26 19:38 user331 Note Added: 0003085
2014-05-26 19:38 user331 Status feedback => assigned
2014-05-26 19:43 henry Status assigned => closed
2014-05-26 19:43 henry Resolution reopened => fixed