CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

solver twoLiquidMixingFoam: from transient to steady state

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Triggin

LinkBack Thread Tools Search this Thread Display Modes
Old   January 11, 2018, 07:27
Default solver twoLiquidMixingFoam: from transient to steady state
New Member
manu ebn
Join Date: Aug 2015
Location: Switzerland
Posts: 18
Rep Power: 7
Triggin is on a distinguished road
I have the following problem:
I have a domain (at the beginning filled with air), which is flooded with nitrogen. Hence the setup is as followed:
  • Inlet with 100% nitrogen
  • Domain (internalField) will create a balance between nitrogen and oxygen.
  • At the outlet the nitrogen is released and oxygen flows in at the same time (different partial pressures, probably by diffusion).

The flow speeds are low (Re < 900), so I assume laminar flow behaviour.

Transient works so far (solver: twoLiquidMixingFoam).

My question now: Is it possible to rewrite the solver, or even solver, from transient to steady-state? I couldn't find a thread for it. Probably you have to compile some stuff, etc.

I'm currently working with OF 3.0.1 but will change within the next days to OF 5.0

Thank you very much - if you need more information, please ask me.
Triggin is offline   Reply With Quote

Old   January 14, 2018, 09:26
Default Update
New Member
manu ebn
Join Date: Aug 2015
Location: Switzerland
Posts: 18
Rep Power: 7
Triggin is on a distinguished road
Hi everyone

Before ready everything: If you are very familiar with error message, please jump directly to the error message i've implemented at the end.

Ok, i managed it to compile a new "myTwoLiquidMixingFoam"-solver (based on the common tutorials). More interesting are probably the changes i did:


UEqn & pEqn
I switched UEqn.H and pEqn.H based on the SIMPLE-solver from the sources and therefore deleted the time derivative.

Switched from pimpleControl pimple(mesh) to simpleControl simple(mesh); and deleted the while ( loop as well as the .correct() and .turbCorr() subs.

switched from pimple.dict() to simple.dict().

The compiling of the solver worked and i'm able to run the solver (what doesn't literally mean that i did everything correct). Well then, lets talk about the case:


I dont think i made any mistake. It contains anyway only three files: "alpha.air", "p_rgh" and "U".

Same here. I think there isn't any fault within the containing files.

Contains all the common files. Lets go through those:
controlDict: Change the application and switched to the general settings for steady-state solvers.

 default           steadyState; // Euler;
 default           Gauss linear;
    default         none;
    div(rhoPhi,U)   bounded Gauss linear;
    div(phi,alpha)  bounded Gauss vanLeer;
    div(phi,k)      bounded Gauss limitedLinear 1;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    default         Gauss linear corrected;
    default         linear;
    default         corrected;
        nAlphaSubCycles     2;
        nAlphaCorr          1;
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-9;
        relTol          0;
        nSweeps         1;
        solver          GAMG;
        tolerance       1e-06;
        relTol          0.01;
        smoother        GaussSeidel;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels     1;
        relTol          0;
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-05;
        relTol          0.1;
        nSweeps         1;
        relTol          0;

    nNonOrthogonalCorrectors 0;
    consistent      yes;
        p               1e-4;
        U               1e-4;
        "(k|epsilon|omega|f|v2)" 1e-3;
At the moment i get the following error:
 smoothSolver:  Solving for Ux, Initial residual = 0.474873, Final residual = 0.0471319, No Iterations 5
smoothSolver:  Solving for Uy, Initial residual = 0.490154, Final residual = 0.0385122, No Iterations 7
smoothSolver:  Solving for Uz, Initial residual = 0.705268, Final residual = 0.0532092, No Iterations 8
Foam::error::printStack(Foam::Ostream&) at ??:?
Foam::sigFpe::sigHandler(int) at ??:?
? in "/lib64/"
double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
Foam::GAMGSolver::solveCoarsestLevel(Foam::Field<double>&, Foam::Field<double> const&) const at ??:?
Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother>  const&, Foam::Field<double>&, Foam::Field<double>  const&, Foam::Field<double>&,  Foam::Field<double>&, Foam::Field<double>&,  Foam::Field<double>&, Foam::Field<double>&,  Foam::PtrList<Foam::Field<double> >&,  Foam::PtrList<Foam::Field<double> >&, unsigned char)  const at ??:?
Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
Beforehand: I cannot use the OF-Debug mode, since I'm working on a cluster and do not have the permissions to compile OF or install packages.

Ok, back to the error message:
It states to me that there is an error withing the PCG-Solver which I actually don't even use. Next is the GAMGSolver mentioned...but this is from my point of view the standard solver. I also added the smoother, so...what could be the error?

I hope this helps to get at least one reply

Best wishes to everyone
isaac_w21 likes this.
Triggin is offline   Reply With Quote

Old   April 27, 2019, 13:27
New Member
Join Date: Apr 2019
Posts: 1
Rep Power: 0
isaac_w21 is on a distinguished road
Hi Folks,

I also need the steadyState twoLiquidMixingFoam solver, has anyone made the solver?
or does anyone know how to rewrite a transient solver to steady?

I hope somebody reply
thanks in advance
isaac_w21 is offline   Reply With Quote


openfoam, solver, steady state, transient, twoliquidmixingfoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Setting the height of the stream in the free channel kevinmccartin CFX 10 July 9, 2015 21:36
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
transient phenomenon using steady state simulations beguxa FLUENT 2 April 15, 2010 02:22
Steady state cavitation solver ? philippose OpenFOAM Running, Solving & CFD 1 January 28, 2010 05:17
transient problem run in steady state luigi FLUENT 4 March 13, 2008 06:54

All times are GMT -4. The time now is 20:34.