moose icon indicating copy to clipboard operation
moose copied to clipboard

Add a Physics for linear FV + mixture model

Open GiudGiud opened this issue 1 year ago • 15 comments

Requires #29177 and maybe #29516 to try out transients (or some other way to get a converged solution)

One difficulty is likely that the two phase equation needs to be an "active" scalar, not a passive one, and be solved inside the pressure-velocity-energy picard iteration. I added code for that. I ll revisit this PR once the prereqs are merged

GiudGiud avatar Dec 24 '24 21:12 GiudGiud

Job Documentation, step Docs: sync website on 6d72f22 wanted to post the following:

View the site here

This comment will be updated on new commits.

moosebuild avatar Dec 25 '24 01:12 moosebuild

Once the PR is ready, please consider adding a technical reviewer as per our suggested merge standards to NS. Thanks!

tanoret avatar Feb 09 '25 19:02 tanoret

Job Coverage, step Generate coverage on 6d72f22 wanted to post the following:

Framework coverage

Mutiple base shas were found when retrieving head reports: 5e24328f05d447a9d705b332e2478ee9d1d69279 98f5d7bf5842f4cb14a1dc4be83983680b5c1024

Modules coverage

Navier stokes

5e2432 #29614 6d72f2
Total Total +/- New
Rate 85.24% 85.28% +0.04% 87.46%
Hits 18785 19226 +441 488
Misses 3252 3318 +66 70

Diff coverage report

Full coverage report

Full coverage reports

Reports

Warnings

  • navier_stokes new line coverage rate 87.46% is less than the suggested 90.0%

This comment will be updated on new commits.

moosebuild avatar Feb 13 '25 04:02 moosebuild

any preferred test case on this? It s only 1 model for mixture. no solidification or any refinement. and any volunteer for technical review? (once I clean up the tests etc, not now)

GiudGiud avatar Feb 13 '25 05:02 GiudGiud

@tanoret I can try to reproduce the rayleigh-bernard convection input with Physics & linear FV. Is that enough ? Is there a particular flow test bed input you would like to see?

GiudGiud avatar Feb 13 '25 05:02 GiudGiud

The results are not a great match for the two test cases between linear and nonlinear.

EDIT: fixed! Some differences in how we were doing friction & interpolation fixed, and gravity term fixed too

GiudGiud avatar Feb 14 '25 19:02 GiudGiud

@tanoret or @MengnanLi91 can you please do the technical review / validation?

GiudGiud avatar Mar 01 '25 05:03 GiudGiud

Can we merge this @tanoret, @MengnanLi91 ?

grmnptr avatar Mar 23 '25 04:03 grmnptr

Can we merge this @tanoret, @MengnanLi91 ?

Maybe wait a bit? @tanoret mentioned he has something to change for the mixture model.

MengnanLi91 avatar Mar 23 '25 04:03 MengnanLi91

Agreement with nonlinear FV is quite good now with these changes

  • extrapolated pressure at the inlet in linear FV
  • pressure drop computation fix for the pressure face interpolation

GiudGiud avatar May 27 '25 16:05 GiudGiud

Rebased on #30288 which should be merged first

GiudGiud avatar May 27 '25 16:05 GiudGiud

@tanoret the linear FV. two phase mixture will now error with skewed meshes. This should address your concern.

BTW, I ran a few single phase cases on skewed meshes without skewness correction and got really bad results, which turned into really good results with skewness correction. Maybe the check I have here should just go in all our FV code as well to request skewness correction.

GiudGiud avatar May 30 '25 23:05 GiudGiud

@grmnptr did you want to re-review this?

GiudGiud avatar Jun 02 '25 16:06 GiudGiud

@grmnptr @tanoret last commit is a bug fix on gravity for the flow physics. We should make a decision on this PR so this bug fix makes it in regardless.

GiudGiud avatar Jun 04 '25 18:06 GiudGiud

Good for me to merge once the test are passing. Thank you for the work @GiudGiud!

Edit: Sorry, could we please add at least one test using kernels? Currently this only use physics and this is not the main way in which our users currently interact with the models. Thank you for understanding

tanoret avatar Jun 18 '25 17:06 tanoret

@grmnptr

GiudGiud avatar Jun 29 '25 11:06 GiudGiud

That flux is lagged, while the advected quantity interpolation is treated implicitly. It feels like we have it backwards here.

That's out of necessity. Writing the linearization of the slip velocity is not easy. See WCNSFV2PSlipVelocityFunctorMaterial we would need to get the dfriction term/du (friction term could be from anything), dgrad_u/du etc.

Both terms are implicit here.

Traditionally, the advecting flux is interpolated with average/rc and the advected quantity uses coeff/(1-coeff).

The "velocity interp coeffs" here is only for the "trick" of multiplying by u/u_old. The face flux is: -face_rho_fd * uslipdotn * u_slip_vel_vec(_index);

face_rho_d is using the expected interpolation method. uslip is using the same functor material as used in nonlinear wcnsfv. There are quite a few terms there. There is possibly one term (advection) that could use RC interpolation, but we were not doing that for nonlinear wcnsfv

We could also try to lag the slip velocity (again the "trick" does not matter imo) since it's effectively the advecting velocity. But that would be different from the nonlinear WCNSFV implementation

That flux is lagged, while the advected quantity interpolation is treated implicitly.

for momentum we treat both implicitly I think. Since this is in the momentum equation we might be in line here?

GiudGiud avatar Jul 01 '25 00:07 GiudGiud

Job Coverage, step Verify coverage on 6d72f22 wanted to post the following:

The following coverage requirement(s) failed:

  • Failed to generate framework coverage rate (required: 81.0%)

moosebuild avatar Jul 01 '25 20:07 moosebuild

Thanks for the reviews!

GiudGiud avatar Jul 01 '25 23:07 GiudGiud