forked from idaholab/moose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding documentation and test for FVFunctorNeumannBC (idaholab#21632)
- Loading branch information
CooperTrucks
authored and
CooperTrucks
committed
Jul 19, 2022
1 parent
4d4f7cb
commit ef99e34
Showing
4 changed files
with
232 additions
and
27 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
modules/navier_stokes/doc/content/source/fvbcs/FVFunctorNeumannBC.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# FVFunctorNeumannBC | ||
|
||
!syntax description /FVBCs/FVFunctorNeumannBC | ||
|
||
# Description | ||
|
||
|
||
!syntax parameters /FVBCs/FVFunctorNeumannBC | ||
|
||
!syntax inputs /FVBCs/FVFunctorNeumannBC | ||
|
||
!syntax children /FVBCs/FVFunctorNeumannBC | ||
|
||
!bibtex bibliography |
233 changes: 206 additions & 27 deletions
233
modules/navier_stokes/test/tests/finite_volume/fvbcs/FVFunctorNeumannBC/fv_functor_neumann.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,241 @@ | ||
mu=1 | ||
rho=1 | ||
k=0.75 | ||
cp=1 | ||
alpha = 1 | ||
advected_interp_method='upwind' | ||
velocity_interp_method='rc' | ||
|
||
[GlobalParams] | ||
rhie_chow_user_object = 'rc' | ||
[] | ||
|
||
[UserObjects] | ||
[rc] | ||
type = INSFVRhieChowInterpolator | ||
u = vel_x | ||
v = vel_y | ||
pressure = pressure | ||
[] | ||
[] | ||
|
||
[Mesh] | ||
[gen] | ||
type = GeneratedMeshGenerator | ||
dim = 2 | ||
nx = 5 | ||
ny = 5 | ||
xmax = 2 | ||
xmin = 0 | ||
xmax = 5 | ||
ymin = -1 | ||
ymax = 1 | ||
nx = 50 | ||
ny = 16 | ||
[] | ||
[] | ||
|
||
[Problem] | ||
fv_bcs_integrity_check = true | ||
[] | ||
|
||
[Variables] | ||
[u] | ||
type = MooseVariableFVReal | ||
initial_condition = 0.5 | ||
[vel_x] | ||
type = INSFVVelocityVariable | ||
initial_condition = 1 | ||
[] | ||
[vel_y] | ||
type = INSFVVelocityVariable | ||
initial_condition = 1 | ||
[] | ||
[pressure] | ||
type = INSFVPressureVariable | ||
[] | ||
[T_fluid] | ||
type = INSFVEnergyVariable | ||
[] | ||
[] | ||
|
||
[FVKernels] | ||
[diff_left] | ||
[mass] | ||
type = INSFVMassAdvection | ||
variable = pressure | ||
advected_interp_method = ${advected_interp_method} | ||
velocity_interp_method = ${velocity_interp_method} | ||
rho = ${rho} | ||
[] | ||
|
||
[u_advection] | ||
type = INSFVMomentumAdvection | ||
variable = vel_x | ||
advected_interp_method = ${advected_interp_method} | ||
velocity_interp_method = ${velocity_interp_method} | ||
rho = ${rho} | ||
momentum_component = 'x' | ||
[] | ||
[u_viscosity] | ||
type = INSFVMomentumDiffusion | ||
variable = vel_x | ||
mu = ${mu} | ||
momentum_component = 'x' | ||
[] | ||
[u_pressure] | ||
type = INSFVMomentumPressure | ||
variable = vel_x | ||
momentum_component = 'x' | ||
pressure = pressure | ||
[] | ||
|
||
[v_advection] | ||
type = INSFVMomentumAdvection | ||
variable = vel_y | ||
advected_interp_method = ${advected_interp_method} | ||
velocity_interp_method = ${velocity_interp_method} | ||
rho = ${rho} | ||
momentum_component = 'y' | ||
[] | ||
[v_viscosity] | ||
type = INSFVMomentumDiffusion | ||
variable = vel_y | ||
mu = ${mu} | ||
momentum_component = 'y' | ||
[] | ||
[v_pressure] | ||
type = INSFVMomentumPressure | ||
variable = vel_y | ||
momentum_component = 'y' | ||
pressure = pressure | ||
[] | ||
|
||
[energy_advection] | ||
type = INSFVEnergyAdvection | ||
variable = T_fluid | ||
velocity_interp_method = ${velocity_interp_method} | ||
advected_interp_method = ${advected_interp_method} | ||
[] | ||
[energy_diffusion] | ||
type = FVDiffusion | ||
variable = u | ||
coeff = 4 | ||
coeff = ${k} | ||
variable = T_fluid | ||
[] | ||
[] | ||
|
||
[FVBCs] | ||
[inlet-u] | ||
type = INSFVInletVelocityBC | ||
boundary = 'left' | ||
variable = vel_x | ||
function = '1' | ||
[] | ||
[inlet-v] | ||
type = INSFVInletVelocityBC | ||
boundary = 'left' | ||
variable = vel_y | ||
function = 0 | ||
[] | ||
[walls-u] | ||
type = INSFVNoSlipWallBC | ||
boundary = 'top bottom' | ||
variable = vel_x | ||
function = 0 | ||
[] | ||
[walls-v] | ||
type = INSFVNoSlipWallBC | ||
boundary = 'top bottom' | ||
variable = vel_y | ||
function = 0 | ||
[] | ||
[outlet_p] | ||
type = INSFVOutletPressureBC | ||
boundary = 'right' | ||
variable = pressure | ||
function = 0 | ||
[] | ||
[inlet_t] | ||
type = FVDirichletBC | ||
boundary = 'left' | ||
variable = T_fluid | ||
value = 1 | ||
[] | ||
|
||
[top_q] | ||
type = FVFunctionNeumannBC | ||
boundary = 'top' | ||
variable = T_fluid | ||
function = 0.1 | ||
[] | ||
[] | ||
|
||
[AuxVariables] | ||
[qdot] | ||
type = MooseVariableFVReal | ||
[Functions] | ||
[top_functor] | ||
type = ADPiecewiseLinear | ||
axis = x | ||
x = '0 0.5 0.6 5' | ||
y = '0 0 1 1' | ||
[] | ||
[] | ||
|
||
[ICs] | ||
[set_qdot] | ||
type = FunctionIC | ||
variable = qdot | ||
function = 'y' | ||
[Materials] | ||
[const_functor] | ||
type = ADGenericFunctorMaterial | ||
prop_names = 'cp alpha' | ||
prop_values = '${cp} ${alpha}' | ||
[] | ||
[ins_fv] | ||
type = INSFVEnthalpyMaterial | ||
rho = ${rho} | ||
temperature = 'T_fluid' | ||
[] | ||
[] | ||
|
||
[FVBCs] | ||
[left] | ||
type = FVFunctorNeumannBC | ||
variable = u | ||
functor = qdot | ||
boundary = left | ||
[Postprocessors] | ||
[temp] | ||
type = ElementAverageValue | ||
variable = T_fluid | ||
[] | ||
[temp_left] | ||
type = SideAverageValue | ||
variable = T_fluid | ||
boundary = 'left' | ||
[] | ||
[temp_right] | ||
type = SideAverageValue | ||
variable = T_fluid | ||
boundary = 'right' | ||
[] | ||
|
||
[right] | ||
type = FVDirichletBC | ||
variable = u | ||
[mass_flow_rate] | ||
type = VolumetricFlowRate | ||
vel_x = vel_x | ||
vel_y = vel_y | ||
advected_quantity = ${rho} | ||
boundary = right | ||
value = 0 | ||
[] | ||
|
||
[enthalpy_flow_rate_out] | ||
type = VolumetricFlowRate | ||
vel_x = vel_x | ||
vel_y = vel_y | ||
advected_quantity = T_fluid | ||
boundary = right | ||
[] | ||
|
||
[enthalpy_flow_rate_in] | ||
type = VolumetricFlowRate | ||
vel_x = vel_x | ||
vel_y = vel_y | ||
advected_quantity = T_fluid | ||
boundary = left | ||
[] | ||
[] | ||
|
||
[Executioner] | ||
type = Steady | ||
solve_type = 'NEWTON' | ||
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type' | ||
petsc_options_value = 'asm 100 lu NONZERO' | ||
line_search = 'none' | ||
nl_rel_tol = 1e-12 | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
csv = true | ||
[] |
Binary file added
BIN
+169 KB
...er_stokes/test/tests/finite_volume/fvbcs/FVFunctorNeumannBC/gold/fv_functor_neumann_out.e
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
modules/navier_stokes/test/tests/finite_volume/fvbcs/FVFunctorNeumannBC/tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Tests] | ||
design = 'FVFunctorNeumannBC.md' | ||
issues = '#21632' | ||
[./FVFunctorNeumannBC] | ||
type = Exodiff | ||
input = fv_functor_neumann.i | ||
exodiff = fv_functor_neumann_out.e | ||
abs_zero = 1e-9 | ||
requirement = "The system shall provide a boundary condition to satisfy neumann boundary conditions with a functor" | ||
ad_indexing_type = 'global' | ||
[../] | ||
[] |