|
[Sponsors] |
How to add Brinkman Term to porousSimpleFoam solver? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 24, 2013, 04:34 |
How to add Brinkman Term to porousSimpleFoam solver?
|
#1 |
Member
Arjang Behnoud
Join Date: Oct 2012
Posts: 63
Rep Power: 14 |
Hi everyone.
the momentum equation of porousSimpleFoam is : the last two terms are darcy and Forchheimer resistance in order.UEqn.h and PEqn.h in solver are: Ueqn.H Code:
tmp<fvVectorMatrix> UEqn ( fvm::div(phi, U) + turbulence->divDevReff(U) ); UEqn().relax(); // Include the porous media resistance and solve the momentum equation // either implicit in the tensorial resistance or transport using by // including the spherical part of the resistance in the momentum diagonal tmp<volScalarField> trAU; tmp<volTensorField> trTU; if (pressureImplicitPorosity) { tmp<volTensorField> tTU = tensor(I)*UEqn().A(); pZones.addResistance(UEqn(), tTU()); trTU = inv(tTU()); trTU().rename("rAU"); volVectorField gradp = fvc::grad(p); for (int UCorr=0; UCorr<nUCorr; UCorr++) { U = trTU() & (UEqn().H() - gradp); } U.correctBoundaryConditions(); } else { pZones.addResistance(UEqn()); eqnResidual = solve ( UEqn() == -fvc::grad(p) ). initialResidual(); maxResidual = max(eqnResidual, maxResidual); trAU = 1.0/UEqn().A(); trAU().rename("rAU"); } Code:
if (pressureImplicitPorosity) { U = trTU()&UEqn().H(); } else { U = trAU()*UEqn().H(); } UEqn.clear(); phi = fvc::interpolate(U) & mesh.Sf(); adjustPhi(phi, U, p); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { tmp<fvScalarMatrix> tpEqn; if (pressureImplicitPorosity) { tpEqn = (fvm::laplacian(trTU(), p) == fvc::div(phi)); } else { tpEqn = (fvm::laplacian(trAU(), p) == fvc::div(phi)); } tpEqn().setReference(pRefCell, pRefValue); // retain the residual from the first iteration if (nonOrth == 0) { eqnResidual = tpEqn().solve().initialResidual(); maxResidual = max(eqnResidual, maxResidual); } else { tpEqn().solve(); } if (nonOrth == nNonOrthCorr) { phi -= tpEqn().flux(); } } #include "continuityErrs.H" // Explicitly relax pressure for momentum corrector p.relax(); if (pressureImplicitPorosity) { U -= trTU()&fvc::grad(p); } else { U -= trAU()*fvc::grad(p); } U.correctBoundaryConditions(); for this I've just define in createFields.H and modify UEqn.H like below: UEqn.H Code:
tmp<fvVectorMatrix> UEqn ( fvm::div(phi, U) - fvm::laplacian(mue,U) + turbulence->divDevReff(U) ); shouldn't I modify PEqn.H? thanks a lot. your hints are appreciated . Best Regards, Arjang Last edited by AmirBaqa1987; December 24, 2013 at 08:44. |
|
December 25, 2013, 02:39 |
|
#2 |
Member
Arjang Behnoud
Join Date: Oct 2012
Posts: 63
Rep Power: 14 |
I'm still waiting for HELP.
|
|
April 30, 2016, 15:59 |
|
#3 |
New Member
Caio Martins Ramos de Oliveira
Join Date: Apr 2016
Posts: 8
Rep Power: 10 |
Were you able to find a solution? Were you right?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[PyFoam] and paraview | eelcovv | OpenFOAM Community Contributions | 28 | May 30, 2016 10:23 |
A problem with porousSimpleFoam solver | AmirBaqa1987 | OpenFOAM Running, Solving & CFD | 4 | October 30, 2015 11:54 |
How to add Radiation to existing buoyantBoussinesqSimpleFoam solver | MasAmi | OpenFOAM Running, Solving & CFD | 4 | January 16, 2014 07:17 |
Add source term in alphaEqn.H of interFoam | tayo | OpenFOAM | 1 | October 23, 2013 04:40 |
add source term in energy equation | chaolian | OpenFOAM Programming & Development | 4 | November 8, 2012 23:22 |