Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatch between mathematical expressions and code implementation in PorousFlowDarcyBase::fullyUpwind function #29929

Open
jltuhnu opened this issue Feb 21, 2025 · 0 comments

Comments

@jltuhnu
Copy link

jltuhnu commented Feb 21, 2025

It seems there is a mismatch between the mathematical expressions on the web interface and the code implementation in the PorousFlowDarcyBase::fullyUpwind(JacRes res_or_jac, unsigned int ph, unsigned int pvar) function. Specifically, the following two lines:

_proto_flux[ph][n] *= mob;  
total_mass_out += _proto_flux[ph][n];  

as it does not align with the mathematical expressions described on the moose webpage https://mooseframework.inl.gov/modules/porous_flow/upwinding.html.

$$ I_{\mathrm{up}} = \sum_{I_{a}\geq 0}I_{a} \ \ \ \textrm{and}\ \ I_{\mathrm{down}} = -\sum_{I_{a}<0} I_{a} \ . $$

Then

$$ R_{a} = I_{a}\frac{I_{\mathrm{up}}}{I_{\mathrm{down}}} \ \ \ \textrm{for}\ \ \ I_{a}<0 \ . $$

and the code meaning:

$$ I_{\mathrm{up}} = \sum_{I_{a}\geq 0} m_{a} I_{a} \ \ \ \textrm{and}\ \ I_{\mathrm{down}} = -\sum_{I_{a}<0} I_{a} \ . $$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant