|
[Sponsors] |
Meaning of MRF.correctBoundaryVelocity(U) and fvOptions(U) in the UEq file. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 28, 2016, 13:31 |
Meaning of MRF.correctBoundaryVelocity(U) and fvOptions(U) in the UEq file.
|
#1 |
Member
Mirage
Join Date: Jul 2012
Posts: 43
Rep Power: 13 |
I am using OF3.0.1 and I am trying to edit an already edited pisoFoam solver written in OF 2.3.
I wrote the UEq in a separate .H file. The solver is working but I am sure, if i am doing it correctly. Here is what i wrote in the new UEq file: Code:
turbulence->correct(); fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U) == flowDirection*gradP ); UEqn.relax(); if (piso.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); } Code:
Info<< "Time = " << runTime.timeName() << nl << endl; // Pressure-velocity PISO corrector { #include "UEqn.H" // --- PISO loop volScalarField rAU(1.0/UEqn.A()); while (piso.correct()) { #include "pEqn.H" { U.correctBoundaryConditions(); } } Code:
while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; // #include "readPISOControls.H" #include "CourantNo.H" #include "setDeltaT.H" // added turbulence->correct(); // Pressure-velocity PISO corrector { // Momentum predictor fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U) == flowDirection*gradP ); UEqn.relax(); if (momentumPredictor) { solve(UEqn == -fvc::grad(p)); } Code:
// Solve the Momentum equation MRF.correctBoundaryVelocity(U); fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + MRF.DDt(U) + turbulence->divDevReff(U) == fvOptions(U) ); UEqn.relax(); fvOptions.constrain(UEqn); if (piso.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); } Code:
MRF.correctBoundaryVelocity(U); Code:
fvOptions(U) Please let me know if you need any other informations. Any advice will be greatly appreciated, thanks in advance |
|
September 29, 2016, 02:55 |
|
#2 |
Member
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 11 |
You only need these, if you want to use fvOptions or MRF. If not, you don't need them.
|
|
|
|