# [waves2Foam] Understanding porousWaveFoam

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

 November 22, 2023, 16:15 Understanding porousWaveFoam #1 New Member   saeed barzegar Join Date: Feb 2012 Posts: 19 Rep Power: 14 Hi All, I've spent a lot of time, and I'm at a point where I have no clue. I was wondering if someone could help me understand porousWaveFoam. In the code (which I'm guessing is built based on porousSimpleFoam), I see the term "pm->addResistance(UEqn)", which represents the resistance forces and the porosity term, n, is only included in the convention term. Based on waves2Foam's manual (eq. 2.4), Jensen et al. (2014), Higuera et al. (2014), Jacobsen et al., 2015, and many other references, shouldn't there be a porosity value behind the transient and viscous terms in UEqn.H file? What we have in porousWaveFoam is: fvVectorMatrix UEqn ( pm->ddt(rho, U) + 1.0/porosity*fvm::div(rhoPhi/(porosityFace), U) + MRF.DDt(rho, U) + turbulence->divDevRhoReff(rho, U) == fvOptions(rho, U) ); Shouldn't it be: fvVectorMatrix UEqn ( pm->(1.0 + cPorField) / porosity *ddt(rho, U) + 1.0/porosity*fvm::div(rhoPhi/(porosityFace), U) + (1.0 + cPorField) / porosity * MRF.DDt(rho, U) + 1.0/porosity * turbulence->divDevRhoReff(rho, U) == fvOptions(rho, U) ); Where cPorField is Cm in those references. When comparing it to olaFlow (link below), I can't understand why the porosity representative parameters behind transient and viscous terms are missing. https://github.com/phicau/olaFlow/bl..._latest/UEqn.H Thank you, Saeed

 November 23, 2023, 14:15 #2 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Copenhagen, Denmark Posts: 1,900 Rep Power: 37 Hi Saeed, Try to follow the "pm->" pointer. It will be a deep dive, where everything happens in the class jensenJacobsenChristensen2014. It is unfortunately a more messy corner of waves2Foam. Kind regards Niels __________________ Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.

November 23, 2023, 16:26
#3
New Member

saeed barzegar
Join Date: Feb 2012
Posts: 19
Rep Power: 14
Quote:
 Originally Posted by ngj Hi Saeed, Try to follow the "pm->" pointer. It will be a deep dive, where everything happens in the class jensenJacobsenChristensen2014. It is unfortunately a more messy corner of waves2Foam. Kind regards Niels
Thanks Niels! Appreciate your quick response. I'll dig more into it and try to understand the jensenJacobsenChristensen2014 class you mentioned. I'll keep you posted on my findings.

Cheers,
Saeed