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

What does "solver nth" refer to?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By tomf
  • 1 Post By tomf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2020, 08:10
Default What does "solver nth" refer to?
  #1
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 725
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
What does

"rho.*"
{
solver nthn;
}

in e.g. tutorials/compressible/rhoPimpleFoam/RAS/squareBendLid/system/fvSolution refer to?

Thx, Domenico.
dlahaye is offline   Reply With Quote

Old   January 12, 2021, 04:38
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 725
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Anybody? Thx!
dlahaye is offline   Reply With Quote

Old   January 13, 2021, 08:38
Default
  #3
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Domenico,

I think it is just a placeholder in the sense that the rhoPimpleFoam solver needs a solver entry for rho or rhoFinal, but internally it uses always the diagonal solver. I just changed the nthn solver into xnthn and it also runs.

Using a grep nthn from my OpenFOAM installation folder only gives this output:

Code:
~/OpenFOAM/OpenFOAM-v2012>grep -r nthn .
./tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/system/fvSolution:        solver nthn;
./tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/system/fvSolution:        solver nthn;
With diagonal or GAMG I can at least find references in code using grep.

Best Regards,
Tom
dlahaye likes this.
tomf is offline   Reply With Quote

Old   January 13, 2021, 12:42
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 725
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Dear Tom,

Thank you for your reply.

My understanding is that rhoPimpleFoam is a pressure-based solver and that the density is updated from the pressure using the equation of state implemented in the thermodynamics as explained e.g. in this post [1].

A solver for density thus seems to be superfluous. Hence my confusion.

Could you please elaborate? Thanks, Domenico.

[1] How rho_ and psi_ are calculated in compressible solvers of OpenFOAM?
dlahaye is offline   Reply With Quote

Old   January 14, 2021, 04:42
Default
  #5
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Dear Domenico,

I have to say I only tried to find any reference to the nthn part, but I just looked at the solver which reads for v2012:

rhoPimpleFoam.C:
Code:
            if (pimple.firstIter() && !pimple.SIMPLErho())
            {
                #include "rhoEqn.H"
            }
Based on the Make/include file I think that this rhoEqn.H is from

src/finiteVolume/cfdTools/compressible/rhoEqn.H:
Code:
{
    fvScalarMatrix rhoEqn
    (
        fvm::ddt(rho)
      + fvc::div(phi)
      ==
        fvOptions(rho)
    );

    fvOptions.constrain(rhoEqn);

    rhoEqn.solve();

    fvOptions.correct(rho);
}
and this solves the continuity equation for rho. I think this means that we will have mass conservation in cases there is a net influx or outflux into a cell, or is there is some source in fvOptions that creates or destroys mass. As the call to phi is explicit (fvc:div(phi)), I think this will result in a simple vector equation, or a pure diagonal matrix.

As to why this is necessary, I would have to spend more time than I have available I am afraid. I can imagine it has something to do with mesh motion at least and mass conservation as described above.

Best Regards,
Tom
dlahaye likes this.
tomf is offline   Reply With Quote

Old   January 14, 2021, 11:08
Default
  #6
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 725
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Dear Tom,

This is very valuable information to receive. Sincere thanks!

Domenico.
dlahaye is offline   Reply With Quote

Old   January 15, 2021, 07:32
Default
  #7
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
I am pretty sure nthn is short for nothing. Hence no solver specified.
An easy way to see if you need to define something is to comment out the entire block:
Code:
/*

"rho.*"
    {
        solver nthn;
    }
*/
If you run your solver now you'll either get an error message that a definition for rho and maybe rhoFinal is missing, or nothing needs to be specified.
You can also try

Code:
"rho.*"
    {
        solver banana;
    }
Since there is definitively no banana solver, you'll get a list of all possible solvers.
Bloerb 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
How can I refer to gas constant? KeiJun OpenFOAM Programming & Development 3 January 7, 2016 18:54
Refer an external image in figure in cfd post kar.coep ANSYS 0 July 27, 2015 06:02
RMS P-vol . what does it refer to? hmasenger CFX 5 August 23, 2013 02:14
Which Book i have to refer for Fluid dynamics? premal Main CFD Forum 0 July 28, 2012 08:20
Newbie: why don't I hear anyone refer to Re in FEM and FD methods? bzz77 Main CFD Forum 6 January 12, 2012 15:16


All times are GMT -4. The time now is 21:58.