Add in Sutherland's law for NEMO problems#1702
Conversation
| if(Kind_TransCoeffModel == TRANSCOEFFMODEL::GUPTAYOS) | ||
| DiffusionCoeffGY(); | ||
| if(Kind_TransCoeffModel == TRANSCOEFFMODEL::SUTHERLAND) | ||
| DiffusionCoeffWBE(); |
There was a problem hiding this comment.
The diffusion coefficient used in the Sutherland model is still computed using the WBE routine
SU2_CFD/src/fluid/CSU2TCLib.cpp
Outdated
|
|
||
| /*--- Translational contribution to thermal conductivity ---*/ | ||
| ThermalCond_tr += (15.0/4.0)*kb*gam_i/denom_t; | ||
| if (denom_t != 0) ThermalCond_tr += (15.0/4.0)*kb*gam_i/denom_t; |
There was a problem hiding this comment.
This is general cleanup. The code doesn't behave just yet.....though this is a problem for another day.
There was a problem hiding this comment.
This is a bit ugly. Is denom always positive? If so the standard way of protecting against division by zero is using fmax(x, EPS)
There was a problem hiding this comment.
Yes denom should always be positive. I think the issue is if demon= 0 then ThermalCond_tr += 0 .
But I agree this is ugly.
There was a problem hiding this comment.
Still, equality comparisons of floating point numbers with 0 are generally a bad idea, because things will also blow up with 1e-100, checking for > EPS should be safer.
There was a problem hiding this comment.
Gotcha. Is there a cleaner/efficient way to make sure that if denom_t = 0, then there is no contribution to thermal conductivity? fmax(x, EPS)
There was a problem hiding this comment.
I changed these around to maybe be less ugly.
SU2_CFD/src/fluid/CSU2TCLib.cpp
Outdated
|
|
||
| /*--- Translational contribution to thermal conductivity ---*/ | ||
| ThermalCond_tr += (15.0/4.0)*kb*gam_i/denom_t; | ||
| if (denom_t != 0) ThermalCond_tr += (15.0/4.0)*kb*gam_i/denom_t; |
There was a problem hiding this comment.
This is a bit ugly. Is denom always positive? If so the standard way of protecting against division by zero is using fmax(x, EPS)
| const su2double rho = val_primvar[RHO_INDEX]; | ||
| const su2double T = val_primvar[T_INDEX]; |
…to feature_NEMO_suth
| ElDegeneracy(0,6) = 15; | ||
|
|
||
| if (viscous) { | ||
| mu_ref[0] = 2.125E-5; |
There was a problem hiding this comment.
Worth adding a comment with a reference for these values?
There was a problem hiding this comment.
Good point. I can add a quick reference.
| if (Kind_FluidModel == SU2_NONEQ && Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE ) { | ||
| SU2_MPI::Error("Only WILKE transport model is stable for the NEMO solver using SU2TClib. Use Mutation++ instead.", CURRENT_FUNCTION); | ||
| if (Kind_FluidModel == SU2_NONEQ && (Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE && Kind_TransCoeffModel != TRANSCOEFFMODEL::SUTHERLAND) ) { | ||
| SU2_MPI::Error("Only WILKE and SUTHERLAND transport models are stable for the NEMO solver using SU2TClib. Use Mutation++ instead.", CURRENT_FUNCTION); |
There was a problem hiding this comment.
How hard would it be to add this routine so it is supported by MPP?
Also, just to confirm, Sutherland is just used for viscosity then WBE is used for diffusion coeffs and thermal conductivity?
There was a problem hiding this comment.
Great question. I don't know if MPP has sutherland's law, but if it does....it should be fairly simple to implement.
I guess with that thought, the Sutherlands law would be the identical implementation, but it would need additional errors if someone tried to used not AR, N2, or Air5/7.
Yes, Sutherland is used for viscosity and thermal conductivity. Blottner part of WBE is still used for diffusion coefficients.
| % -------------------- NEMO NUMERICAL METHOD DEFINITION -----------------------% | ||
| % | ||
| % Mixture transport properties (WILKE,GUPTA-YOS,CHAPMANN-ENSKOG) | ||
| % Mixture transport properties (WILKE,GUPTA-YOS,CHAPMANN-ENSKOG, SUTHERLAND) |
There was a problem hiding this comment.
Overall looks good! I think this will be a good addition for running the lower temperature experimental verification cases with NEMO, where the T_{\inf} is low but he Ma_{\inf} is high.
Proposed Changes
Here I am adding Sutherland's law for viscosity and thermal conductivity for NEMO problems using the native library. Experiments for these types of problems often are run using very low temperatures (~65K). Our current models aren't suited well for these temperature ranges.
There is also some general clean up work in the still-not-working Gupta-Yos model and viscous numerics.
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.