CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Diverging Solution when using turbulentMixingLengthDissipationRateInlet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2021, 10:21
Default Diverging Solution when using turbulentMixingLengthDissipationRateInlet
  #1
New Member
 
Marco
Join Date: Jul 2021
Posts: 4
Rep Power: 5
MisterAceituna is on a distinguished road
Hi everyone!

I'm currently working on a case of an engine with the piston moving according to crank rod angle.

The simulation works fine with rhoPimpleFoam and similar solvers, though I'm encountering this issue:

when using both k-epsilon and k-omega, if I put a fixedValue at inlet, the simulations run nicely, while if I put the specification of turbulentMixingLengthDissipationRateInlet (or turbulentMixingLengthFrequencyInlet) , which is what I really want to use, the solvers crashes in few steps, generating the error of negative temperature.

What do you think can be the main problem in setting this BC?

Tell me if uploading the BC field or some dicts may help.

Thank you very much!
MisterAceituna is offline   Reply With Quote

Old   July 17, 2021, 10:51
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
Such complicated b.c. are often developed and tested at a typical test case only. It may happen that they have not the stability which more general b.c. have.

Negative temeratures are the result of instable simulation. You should try two things:

- Store the result frequently and look where the instability first occurs. Look at the mesh there.
- Use more stable simulation conditions.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 17, 2021, 10:56
Default
  #3
New Member
 
Marco
Join Date: Jul 2021
Posts: 4
Rep Power: 5
MisterAceituna is on a distinguished road
Thank you for your answer.

I don't think it is a mesh related issue, since I tried many different refinements but the outcome is always the same.

Can i ask you to check is these numerics are stable enough? Do you think I should change something?


Code:
ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         bounded Gauss upwind;
    div(phi,U)      Gauss upwind;
    div(phi,e)      Gauss upwind;
    div(phid,p)     Gauss upwind;
    div(phi,K)      Gauss upwind;
    div(phiv,p)     Gauss upwind;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) bounded Gauss upwind;
    div(phi,burnt) Gauss upwind;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear limited corrected 0.5;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
	p;
}
Code:
solvers
{
    "(p|rho)"
    {
        solver          GAMG;
        smoother  	DIC;
        tolerance       1e-8;
        relTol          0.01;
    }

    "(p|rho|pcorr)Final"
    {
        $p;
        //relTol          0;
    }

    "(U|k|epsilon|burnt|h)"
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-8;
        relTol          0.01;
    }

    "(U|k|epsilon|burnt|h)Final"
    {
        $U;
        relTol          0;
    }
}

PIMPLE
{
    nOuterCorrectors    4;
    nCorrectors         3;
    nNonOrthogonalCorrectors 2;
}

relaxationFactors
{
    equations
    {
        "(U|k|epsilon).*"   1;
    }
}

cache
{
    grad(U);
}
MisterAceituna is offline   Reply With Quote

Old   July 17, 2021, 14:05
Default
  #4
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
You may switch form upwind to linear upwind. It is more stable, but also more diffusive.

Do you have any relaxation? I recommend using it, at least at the beginning.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 17, 2021, 14:09
Default
  #5
New Member
 
Marco
Join Date: Jul 2021
Posts: 4
Rep Power: 5
MisterAceituna is on a distinguished road
doesn't relaxation factors induce delay in unsteady simulations?
If not, how do you raccomand to impose them?
MisterAceituna is offline   Reply With Quote

Old   July 17, 2021, 16:45
Default
  #6
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
Yes, relaxation has an effect. But it is improtant that the simulation starts at all. You may stop it and reduce relaxation at later simulated time.

in fvSolution:

Code:
relaxationFactors
{
    "(U|T|k|epsilon|omega|R)"                     0.7;
     "p"                                          0.3;
}
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for Automatic Solution Initialization for previous case data file gartz89 Fluent UDF and Scheme Programming 6 March 30, 2020 08:38
Trimmer mesh problems - solution diverging lightning0 STAR-CCM+ 9 August 8, 2018 08:58
Diverging solution for hypersonic flow lipiroy SU2 1 July 2, 2018 13:04
diverging solution in bubble rise shash FLUENT 0 August 11, 2012 17:39
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58


All times are GMT -4. The time now is 10:49.