CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Other] Solver crashes - bad mesh? (https://www.cfd-online.com/Forums/openfoam-meshing/151663-solver-crashes-bad-mesh.html)

MtnRunBeachBum April 14, 2015 17:45

Solver crashes - bad mesh?
 
Hi All,

I'm pretty new as a CFD practitioner, especially OF, so bare with me. (My background is in applied aero, as a test engineer.)

I'm creating a test case where I want to run compressible flow around a model, with turbulence. I have the model via .stl files, and I'm able to create a mesh via snappyhexMesh. For now, I'm not too worried about how good the mesh is, I just need to go through the process; obviously a good mesh is a goal, just not mandatory at this stage.

When I try to run the solver, it gets setup to go, loads info from the various dictionaries, then crashes hard. I realize this is the plight of CFD, just looking for some direction on how to proceed. What I think is happening, due to the following in the snappy output, is the mesh cells are not meeting up properly with the model cells:
Code:

total attraction master points: 164912 attraction to:
feature point:      0
feature edge:      0
nearest surface:  0
rest:                  164912

I've been trying to setup the surfaceFeatureExtractDict to pull out the eMesh files from my .stl models, but to no avail. One thing I'm not too clear on is how the .eMesh files are created? Do I run the dictionary separately, or does snappy run it?


Any suggestions?

jhoepken April 15, 2015 02:50

It would be great, if you could post the complete output of checkMesh

MtnRunBeachBum April 15, 2015 18:01

I'd rather not, due to the sensitivy of the work. If it's really that critical I can rename the model and post the file for you. Can you give me some suggestions as to what I should be looking for in checkMesh?


A couple things that caught my untrianed eye:

At time = 0:

Code:

Mesh OK.

--> FOAM Warning :
    From function polyMesh::readUpdateState polyMesh::readUpdate()
    in file meshes/polyMesh/polyMeshIO.C at line 207
    Number of patches has changed.  This may have unexpected consequences.  Proceed with care

.


And at time = 1, I get:

Code:

Checking geometry...
    Overall domain bounding box (-100 -600 -100) (1200 600 400)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (1.28774e-16 1.06143e-17 -3.51155e-16) OK.
    Max cell openness = 3.61597e-16 OK.
    Max aspect ratio = 11.7652 OK.
    Minimum face area = 0.0335495. Maximum face area = 172.18.  Face area magnitudes OK.
    Min volume = 0.186927. Max volume = 875.888.  Total volume = 7.72916e+08.  Cell volumes OK.
    Mesh non-orthogonality Max: 65.0009 average: 9.96491
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 8.22539, 13 highly skew faces detected which may impair the quality of the results
  <<Writing 13 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End

I don't know how much skewness can affect the simulation crashing, but that is something I can look into I suppose...

Thanks for any help! :)

jhoepken April 16, 2015 02:18

No problem :)

MtnRunBeachBum April 16, 2015 11:27

Forgot to throw this up before...output from the solver (sonicFoam) just before it crashes:

Code:

Create time

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading thermophysical properties

Selecting thermodynamics package
{
    type            hePsiThermo;
    mixture        pureMixture;
    transport      const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model realizableKE
realizableKECoeffs
{
    Cmu            0.09;
    A0              4;
    C2              1.9;
    sigmak          1;
    sigmaEps        1.2;
    Prt            1;
}

Creating field kinetic energy K

No finite volume options present


Starting time loop

Time = 0.0125

Courant Number mean: 0.755775 max: 28.4615
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  which: no linux-gate.so.1 in (/home/cfd/OpenFOAM/ThirdParty-2.3.1/platforms/linuxGcc/gperftools-svn/bin:/home/cfd/OpenFOAM/ThirdParty-2.3.1/platforms/linuxGcc/ParaView-4.1.0/bin:/home/cfd/OpenFOAM/cfd-2.3.1/platforms/linuxGccDPOpt/bin:/home/cfd/OpenFOAM/site/2.3.1/platforms/linuxGccDPOpt/bin:/home/cfd/OpenFOAM/OpenFOAM-2.3.1/platforms/linuxGccDPOpt/bin:/home/cfd/OpenFOAM/OpenFOAM-2.3.1/bin:/home/cfd/OpenFOAM/OpenFOAM-2.3.1/wmake:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
__kernel_sigreturn
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  Foam::operator/(Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#5  Foam::diagonalSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#8  Foam::fvMatrix<double>::solve() at ??:?
#9 
 at ??:?
#10  __libc_start_main in "/usr/lib/libc.so.6"
#11 
 at ??:?
Floating point exception (core dumped)

I'm working to trace back to the origin of the error, but I'm having some difficulty making sense of what OF is telling me. Anyone more experienced with a suggestion as to where to look?

Thanks!

jhoepken April 17, 2015 02:57

I'm not familiar with sonicFoam, but the maximum Courant number is 28. Try to decrease it.

MtnRunBeachBum April 20, 2015 08:46

resolution
 
See this post for the resolution I came across to my problem:

http://www.cfd-online.com/Forums/ope...tml#post542729

And regarding Courant number, I did modify my original mesh and reduce the timestep to get it more reasonable.



Thanks for the help everyone. Cheers!


All times are GMT -4. The time now is 15:57.