# How to add Brinkman Term to porousSimpleFoam solver?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 24, 2013, 04:34 How to add Brinkman Term to porousSimpleFoam solver? #1 Member   Arjang Behnoud Join Date: Oct 2012 Posts: 61 Rep Power: 12 Hi everyone. the momentum equation of porousSimpleFoam is : $U.\triangledown U=-\triangledown p+\triangledown .\tau-\mu DU-\frac{1}{2}\rho F |U|U$ the last two terms are darcy and Forchheimer resistance in order.UEqn.h and PEqn.h in solver are: Ueqn.H Code: ``` tmp 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 trAU; tmp trTU; if (pressureImplicitPorosity) { tmp 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 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();``` now I want to add Brinkman Term to momentum equation, I mean: $U.\triangledown U=-\triangledown p+\triangledown .\tau+{\color{Magenta} \mu {_{e}}\triangledown ^{^{2}}U}-\mu DU-\frac{1}{2}\rho F |U|U$ for this I've just define $\mu {_{e}}$ in createFields.H and modify UEqn.H like below: UEqn.H Code: ``` tmp UEqn ( fvm::div(phi, U) - fvm::laplacian(mue,U) + turbulence->divDevReff(U) );``` am I right? shouldn't I modify PEqn.H? thanks a lot. your hints are appreciated . Best Regards, Arjang Caio Martins likes this. Last edited by AmirBaqa1987; December 24, 2013 at 08:44.

 December 25, 2013, 02:39 #2 Member   Arjang Behnoud Join Date: Oct 2012 Posts: 61 Rep Power: 12 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: 8 Were you able to find a solution? Were you right?