|
[Sponsors] |
how to add correct( ) in Foam.C to update functions? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 17, 2016, 22:28 |
how to add correct( ) in Foam.C to update functions?
|
#1 |
New Member
popovich
Join Date: Jan 2016
Posts: 9
Rep Power: 10 |
Dear members, my functins rho1() rho2() p() are as follows:
virtual const volScalarField& rho1() const { return alpha1_.db().lookupObject<volScalarField>("rho1"); } virtual const volScalarField& rho2() const { return alpha2_.db().lookupObject<volScalarField>("rho2"); } virtual const volScalarField& p() const { return alpha1_.db().lookupObject<volScalarField>("p"); } Foam.C are as follows: Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { #include "readTimeControls.H" #include "CourantNo.H" #include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { #include "alphaEqnsSubCycle.H" // correct interface on first PIMPLE corrector if (pimple.corr() == 1) { interface.correct(); } solve(fvm::ddt(rho) + fvc::div(rhoPhi)); #include "UEqn.H" #include "TEqn.H" // --- Pressure corrector loop while (pimple.correct()) { #include "pEqn.H" } if (pimple.turbCorr()) { turbulence->correct(); } } runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; return 0; } |
|
May 17, 2016, 22:35 |
|
#2 |
New Member
popovich
Join Date: Jan 2016
Posts: 9
Rep Power: 10 |
how to add correct() in Foam.C to update rho1() rho2() p() ?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is my Dynamic mesh setup correct? | cfd seeker | FLUENT | 16 | October 30, 2020 07:16 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Where are correct () and update() functions defined ? | sasanghomi | OpenFOAM | 5 | August 16, 2013 10:49 |
Using Workbench, CFX-Pre doesn't update mesh from upstream data | Shawn_A | CFX | 2 | November 25, 2012 14:06 |
How to add temperature to icoFoam - correct? | uli | OpenFOAM Programming & Development | 3 | July 31, 2012 17:48 |