-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adding dirichlet BC for inlet mass flow rate #29710
base: next
Are you sure you want to change the base?
Conversation
Old solution with the old mass flow rate boundary conditions as in #29709: +----------------+----------------+----------------+----------------+----------------+----------------+ New solution with the Dirichlet mass flow rate BC: +----------------+----------------+----------------+----------------+----------------+----------------+ Now the mass flow rate solution is respected as imposed by the user. |
@freiler I would also appreciate your technical review if you have the time |
!syntax description /FVBCs/WCNSFVMomentumFluxDirichletBC | ||
|
||
This boundary condition is similar to [WCNSFVMassFluxBC.md], except that it enforced the mass | ||
flow rate provided by the user as a Dirichlet boundary conditions. Hence, using this boundary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flow rate provided by the user as a Dirichlet boundary conditions. Hence, using this boundary | |
flow rate provided by the user as a Dirichlet boundary condition. Hence, using this boundary |
|
||
This boundary condition is similar to [WCNSFVMassFluxBC.md], except that it enforced the mass | ||
flow rate provided by the user as a Dirichlet boundary conditions. Hence, using this boundary | ||
condition the mass flow rate at the inlet faces will always be the one specified by the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mass flow rate was respected in the mass equation (by the solver), the issue was that the VolumetricFlowRate
PP did not use the velocity computed from the flux value on the face, rather an extrapolated value based on the velocity field.
A few months ago, I added another postprocessor which actually uses the mass flux provided by the user:
https://mooseframework.inl.gov/source/postprocessors/SideFVFluxBCIntegral.html
which should give the exact value back. Could you mention these details in the documentation ?
At the same time, I am fine having a Dirichlet BC for this if that makes the DO coupling much easier.
/** | ||
* A class for velocity inlet boundary conditions | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* A class for velocity inlet boundary conditions | |
*/ | |
/** | |
* A class for velocity inlet boundary conditions when the flow rate is given | |
*/ |
# For a real case, use a GeneralFluidFunctorProperties and a viscosity rampdown | ||
k = 1 | ||
cp = 1000 | ||
mu = 1e2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need mixing length if we are operating with these?
# [fp] | ||
# type = FlibeFluidProperties | ||
# [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# [fp] | |
# type = FlibeFluidProperties | |
# [] |
[ins_fv] | ||
type = INSFVEnthalpyFunctorMaterial | ||
temperature = 'T_fluid' | ||
rho = ${rho} | ||
[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ins_fv] | |
type = INSFVEnthalpyFunctorMaterial | |
temperature = 'T_fluid' | |
rho = ${rho} | |
[] | |
[ins_fv] | |
type = INSFVEnthalpyFunctorMaterial | |
temperature = 'T_fluid' | |
rho = 'rho' | |
[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that rho is changing here.
[AuxKernels] | ||
inactive = 'mixing_len' | ||
[mixing_len] | ||
type = WallDistanceMixingLengthAux | ||
walls = 'top' | ||
variable = mixing_length | ||
execute_on = 'initial' | ||
delta = 0.5 | ||
[] | ||
[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[AuxKernels] | |
inactive = 'mixing_len' | |
[mixing_len] | |
type = WallDistanceMixingLengthAux | |
walls = 'top' | |
variable = mixing_length | |
execute_on = 'initial' | |
delta = 0.5 | |
[] | |
[] |
type = Transient | ||
solve_type = 'NEWTON' | ||
petsc_options_iname = '-pc_type -pc_factor_shift_type' | ||
petsc_options_value = 'lu NONZERO' | ||
|
||
[TimeStepper] | ||
type = IterationAdaptiveDT | ||
dt = 1.0 | ||
optimal_iterations = 6 | ||
[] | ||
end_time = 1e2 | ||
|
||
nl_abs_tol = 1e-9 | ||
nl_max_its = 50 | ||
line_search = 'none' | ||
|
||
automatic_scaling = true | ||
off_diagonals_in_auto_scaling = true | ||
compute_scaling_once = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the given fluid properties we might be able to do a steady solution here.
Closes #29709