View Issue Details

IDProjectCategoryView StatusLast Update
0000434OpenFOAMBugpublic2012-02-24 12:27
Reporteruser364Assigned Tohenry  
PrioritylowSeveritytextReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version10.04
Summary0000434: Porous media, power-law model, error in the description formula in porousZone.C
DescriptionIn the file porousZone.H it states that the power-law model of porous media is implemented using the following equation:

S = - \rho C_0 |U|^{(C_1 - 1)/2} U

but then, in the file porousZoneTemplate.C the member function that adds the resistance of the porous media in explicit and implicit form is:

Udiag[cells[i]] +=
                V[cells[i]]*rho[cells[i]]*C0*pow(magSqr(U[cells[i]]), C1m1b2);

AU[cells[i]] = AU[cells[i]]
                + I*(rho[cells[i]]*C0*pow(magSqr(U[cells[i]]), C1m1b2));

where C1m1b2 is (C_1-1)/2. We can see that it uses magSqr instead of mag to obtain the magnitude of velocity.

I have obtained the coefficients for both Power-law (using the formula given in the description in porousZone.H) and Darcy-Forchheimer, and simulated them with an grid independent mesh; the results of Darcy are almost the same as the hand calculations, whereas the Power-law is much smaller.

Changing magSqr to mag it gives values almost the same as hand calculations (always following the formula given in porousZone.H).

On the other hand, reading the implementation in Fluent of this power-law (https://www.sharcnet.ca/Software/Fluent12/html/ug/node233.htm) and in literature, I deduce that the formula given in the description of porousZone.H is erroneous, it should be:

S = - \rho C_0 {|U|^2}^{(C_1 - 1)/2} U

thus, the equation used in the member function is the correct one. Using the latter equation to obtain the coefficients gives the correct result in the simulations.


TagsNo tags attached.

Activities

henry

2012-02-24 12:27

manager   ~0001065

Thanks for the bug-report.
Resolved by commit 7ebc6a2afa10687ee0e471764256d0707b3ccec5

Issue History

Date Modified Username Field Change
2012-02-23 21:13 user364 New Issue
2012-02-24 12:27 henry Note Added: 0001065
2012-02-24 12:27 henry Status new => resolved
2012-02-24 12:27 henry Resolution open => fixed
2012-02-24 12:27 henry Assigned To => henry