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

Creating solver without pressure corrections

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Lisandro Maders

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2015, 16:38
Default Creating solver without pressure corrections
  #1
Member
 
Lisandro Maders
Join Date: Feb 2013
Posts: 98
Rep Power: 13
Lisandro Maders is on a distinguished road
Hi,

I am trying to create a solver that solves only the following equations:

1) Continuity
2) Momentum
3) Generic transport equation of variable Z

The fact is that my pressure field is constant, it almost does not vary. And also I take the density from a table based on Z values. So I do not need to make that pressure corrections that SIMPLE algorithm and others do. So how to proper write the .C solver file? Or if you can suggest me to take a look in some specific code that has this simplification it would be good as well.

Regards,

Lisandro
Lisandro Maders is offline   Reply With Quote

Old   October 1, 2015, 20:15
Default What I have done so far..
  #2
Member
 
Lisandro Maders
Join Date: Feb 2013
Posts: 98
Rep Power: 13
Lisandro Maders is on a distinguished road
Here is what I have done so far, but it is dividing by zero (at least I interpreted the error like this) somewhere in rhoEqn..

Code:
int main(int argc, char *argv[])
{
    #include "setRootCase.H"
    #include "createTime.H"
    #include "createMesh.H"
    #include "initFGM.H"
    #include "createFields.H"

    simpleControl simple(mesh);

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    #include "CourantNo.H"
//    #include "compressibleCourantNo.H"

    while (simple.loop())
    {
        Info<< "Time = " << runTime.timeName() << nl << endl;

        while (simple.correctNonOrthogonal())
        {
        Info << " Antes de rhoEqn.H " << endl;
        Info << " Escrevendo rho " << rho << endl;
        Info << " Escrevendo phi " << phi << endl;
        #include "rhoEqn.H"
        #include "UEqn.H"
        #include "pvEqn.H"
        #include "ztEqn.H"
        }

        if (runTime.write())
        { 
            #include "writeFGMfields.H"
            #include "writeThermoPropertyFields.H"
        }

        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
    }

    Info<< "End\n" << endl;

    return 0;
}
Anything incredibly wrong at a first look?
Jamamoto takasi likes this.
Lisandro Maders is offline   Reply With Quote

Old   October 7, 2015, 09:31
Default Still weird
  #3
Member
 
Lisandro Maders
Join Date: Feb 2013
Posts: 98
Rep Power: 13
Lisandro Maders is on a distinguished road
Jamamoto,

I interpreted your "like" as: that looks right! However, the results I am getting for velocity field are very weird, which tells me I missed something in this simplification.

Could you or someone else give me some help on this? Is there any solver in OpenFOAM that does not make use of such simplification (no pressure/momentum corrections)..


Thanks!
Lisandro Maders is offline   Reply With Quote

Reply

Tags
correction, momentum, pressure, simple, simplification


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
Pressure equation for compressible solver Akshay OpenFOAM Programming & Development 8 October 3, 2015 09:22
Help! Divergence detected in AMG solver: pressure correction user0314 FLUENT 3 September 2, 2011 16:12
Using pressure based solver for compressible flows aamer Main CFD Forum 2 June 15, 2011 12:45
Creating New Solver: For particle-laden compressible jets sankarv OpenFOAM 0 April 4, 2010 18:06
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 15:00


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