CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   dieselFoam --> Janaf Error, what are the root causes? (http://www.cfd-online.com/Forums/openfoam/82654-dieselfoam-janaf-error-what-root-causes.html)

pajofego December 1, 2010 16:40

dieselFoam --> Janaf Error, what are the root causes?
 
Hello at all,

now I've spend a lot of time to understand how I can perform my own simulation with an injection similiar to the aachenBomb. So at first I run the aachenBomb test case and modified it to a different injected mass and mass rate. For the aachenBomb geometry it works. After this I decide to change the geometry to an cylindrical tube using a tet mesh. So this works also fine. But after modifying the tube to a more complex geometry I got the problem with the Janaf temperature error which is out of the specific range of 200 - 5000 K. Using a finer mesh this will not help. The simulation stops earlier then with a worst mesh?

So the question is how I can identify the root cause of the Janaf Error? Is it related to the quality of the mesh? Which procedure you can recommend me to find the problem?

Thanks in advance.
pajofego

nakul December 2, 2010 06:59

Hi,

What exactly did you change? Did you only changed the domain or did you made some changes in BC and IC also?

This error comes generally when something is wrong with your BC or mesh. If you are using the same BC as in the tutorial then have a look at your mesh. Run a "checkMesh" command and see what turns out.

Also specify more details regarding your case, otherwise it would be difficult to advice.

pajofego December 2, 2010 16:13

Hi,

in fact. I should give more informations about my case.

I've only change the domain. The BC are all the same. That means like the tutorial all walls.

Also I've change the Injector's properties - I would like to use a common rail injector:
Code:

        commonRailInjectorProps
        {
            position            (0 0.0025 0);
            direction          (0 1 0);
            diameter            1.73e-7;
            mass                0.4275e-06;//0.4275e-05;
            injectionPressure  5.0e+5;
            temperature        320;
            nParcels            5000;

            X
            (
                1.0
            );

            massFlowRateProfile
            (
                (0 0)
                (0.0013 1.32e-6)
                (0.00135 1.32e-6)
                (0.0014 1.32e-6)
                (0.00145 1.32e-6)
                (0.0015 1.32e-6)
                (0.00155 1.32e-6)
                (0.0016 1.32e-6)
                (0.00165 1.32e-6)
                (0.0017 1.32e-6)
                (0.00175 1.32e-6)
                (0.0018 1.32e-6)
                (0.00185 1.32e-6)
                (0.0019 1.32e-6)
                (0.0025 0)
      );

Here is the output of checkMesh. The mesh was done with gmsh. Regarding the output of the checkMesh I cannot find any advises.

Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:          858010
    faces:            9983705
    internal faces:  9835631
    cells:            4954834
    boundary patches: 1
    point zones:      0
    face zones:      0
    cell zones:      1

Overall number of cells of each type:
    hexahedra:    0
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    4954834
    polyhedra:    0

Checking topology...
    Boundary definition OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
    Patch              Faces    Points  Surface topology                 
    Wall                148074  74039    ok (closed singly connected)     

Checking geometry...
    Overall domain bounding box (-0.06725 -0.017 -0.06725) (0.124412 0.2 0.06725)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (1.34258e-19 2.12949e-20 -1.44159e-20) OK.
    Max cell openness = 1.89982e-16 OK.
    Max aspect ratio = 10.3626 OK.
    Minumum face area = 1.96441e-08. Maximum face area = 4.53391e-06.  Face area magnitudes OK.
    Min volume = 1.76279e-12. Max volume = 3.14575e-09.  Total volume = 0.000710906.  Cell volumes OK.
    Mesh non-orthogonality Max: 66.8448 average: 18.585
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.06135 OK.

Mesh OK.

End

If more informations are needed please let me know. Thanks and best regards.
pajofego

nakul December 3, 2010 02:42

Hi,

It might be possible that problem is with your mesh. Your Max. non-orhtogonality, although OK, is a little high, in my opinion. Try to modify your mesh, if possible.

Keep your maxCo to 0.1 and then try to run. Also if possible upload an image of your mesh, especially the areas where there is skewness and non-orthogonality.

Also you may use first order schemes in your fvSchemes file.

Rickard.Solsjo December 7, 2010 10:35

I had problems running before as well. You could try to increase the number of parcels you are injection. Okay you only have 0.something milligrams but i would still recommend at least 100 000 parcels, maybe more.

pajofego December 7, 2010 16:22

So, I've done improvements regarding the mesh. I tried to use a structed hex mesh in gmsh, which is not really simple. It was possible to reduce the max. skewness up to 0.35 and I was able to run a simulation for a cylindrical geometry with a hex mesh. Tet meshes doesn't work for my geometry. I will upload a picture of the meshes that I used an I will also start a simulation with an increased parcel number. What is the benefit using a increased parcel number.

Thanks
pajofego

pajofego December 12, 2010 08:11

5 Attachment(s)
Hello at all,

I came back with my problem, after done some improvements regarding the mesh.

It stills will not work!

That's the last iteration before I got a floating point exception, instead of an janaf error
Code:

Number of parcels in system.... | 9959
Injected liquid mass........... | 4.275 mg
Liquid Mass in system.......... | 3.8261 mg
SMD, Dmax...................... | 88.5959 mu, 150.154 mu
Added gas mass................. | 1.29834 mg
Evaporation Continuity Error... | 0.849442 mg
ExecutionTime = 2363.32 s  ClockTime = 2397 s

Courant Number mean: 8.40164e-05 max: 0.0557897
deltaT = 5.19677e-08
Time = 0.00335422

Evolving Spray
Solving chemistry
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#1  Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#2  Uninterpreted:
#3  Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam171/applications/bin/linuxGccDPOpt/dieselFoam"
#5 
 in "/opt/openfoam171/applications/bin/linuxGccDPOpt/dieselFoam"
#6  __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#7 
 in "/opt/openfoam171/applications/bin/linuxGccDPOpt/dieselFoam"
Floating point exception

Enclosed you can find some pictures about my case and geometry. At simulation time 0.00275 (dt = 5e-5) the envolving of the spray seems to works well, also the time step is stable. Near by the simulation time 0.00335 the timestep gets smaller (5.19677e-08) and I got high velocity gradients at the wall. Take a look on the pictures. So my question is, what I'm doing wrong?

Here the output of checkMesh:

Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:          47660
    faces:            134197
    internal faces:  125723
    cells:            43320
    boundary patches: 1
    point zones:      0
    face zones:      0
    cell zones:      1

Overall number of cells of each type:
    hexahedra:    43320
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:    0

Checking topology...
    Boundary definition OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
    Patch              Faces    Points  Surface topology                 
    Wall                8474    8476    ok (closed singly connected)     

Checking geometry...
    Overall domain bounding box (-0.065 -0.065 -0.017) (0.065 0.065 0.06)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (-7.35605e-19 8.20756e-19 -7.23779e-19) OK.
    Max cell openness = 2.05763e-16 OK.
    Max aspect ratio = 10.8915 OK.
    Minumum face area = 1.12701e-06. Maximum face area = 1.15717e-05.  Face area magnitudes OK.
    Min volume = 1.35242e-09. Max volume = 1.40514e-08.  Total volume = 0.000394841.  Cell volumes OK.
    Mesh non-orthogonality Max: 74.3926 average: 14.9572
  *Number of severely non-orthogonal faces: 512.
    Non-orthogonality check OK.
  <<Writing 512 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
    Max skewness = 0.993807 OK.

Mesh OK.

End

Thanks in advance
pajofego

niklas December 12, 2010 09:05

This error comes from this line in dieselFoam.C
Code:

          volScalarField tk =
                Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());

it means that either the viscosity or epsilon is negative.
You probably have some earlier warnings about bounding the epsilon equation.

what you can do is to create a new field tk2 and limit that like below to calculate tk.

Code:

              volScalarField tk2 = turbulence->muEff()/rho/turbulence->epsilon();
            tk2.max(1.0e-15);
            volScalarField tk = Cmix*sqrt(tk2);

That will fix the error you are seeing, but I cant say if it will fix your problem.


All times are GMT -4. The time now is 23:17.