Skip to content

Commit

Permalink
Use one-term boundary expansion by default for INSFV
Browse files Browse the repository at this point in the history
This fixes idaholab#16822 although perhaps not 100% satisfactorily. If a user
knows they only have cells with a maximum of one extrapolated boundary
face or if they know that if the cell has multiple extrapolated boundary
faces that it is orthogonal (e.g. dCf is parallel to Sf), then they can
safely set `two_term_boundary_expansion = true` in their input. But in
the interest of allowing more things to just work out of the box (like
any old tri or tet mesh), I think it makes sense to make the one term
expansion the default. I prefer doing this over something like
projecting dCf onto the surface normal because this would cost a user
accuracy in the case where they have intelligently designed their mesh
such that there is only a maximum of one extrapolated boundary face per
cell (gmsh meshes for example avoid this).
  • Loading branch information
lindsayad committed Apr 30, 2021
1 parent 2417d23 commit 5241ea2
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 5 deletions.
6 changes: 1 addition & 5 deletions modules/navier_stokes/src/variables/INSFVVariable.C
Expand Up @@ -20,11 +20,7 @@
InputParameters
INSFVVariable::validParams()
{
auto params = MooseVariableFVReal::validParams();
#ifdef MOOSE_GLOBAL_AD_INDEXING
params.set<bool>("two_term_boundary_expansion") = true;
#endif
return params;
return MooseVariableFVReal::validParams();
}

INSFVVariable::INSFVVariable(const InputParameters & params) : MooseVariableFVReal(params)
Expand Down
Expand Up @@ -5,6 +5,10 @@ velocity_interp_method='rc'

restricted_blocks = '1'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
parallel_type = 'replicated'
[mesh]
Expand Down
Expand Up @@ -10,6 +10,10 @@ rayleigh=1e3
hot_temp=${rayleigh}
temp_ref=${fparse hot_temp / 2.}

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down
Expand Up @@ -9,6 +9,10 @@ mu = ${fparse rho * bulk_u * D / Re}
advected_interp_method='upwind'
velocity_interp_method='rc'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down
Expand Up @@ -5,6 +5,10 @@ cp=1
advected_interp_method='average'
velocity_interp_method='rc'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down
Expand Up @@ -3,6 +3,10 @@ rho=1.1
advected_interp_method='average'
velocity_interp_method='rc'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down
Expand Up @@ -3,6 +3,10 @@ rho=1.1
advected_interp_method='average'
velocity_interp_method='rc'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down
Expand Up @@ -3,6 +3,10 @@ rho=1.1
advected_interp_method='average'
velocity_interp_method='rc'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down
Expand Up @@ -3,6 +3,10 @@ rho=1.1
advected_interp_method='average'
velocity_interp_method='rc'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down
Expand Up @@ -6,6 +6,10 @@ cp=1
advected_interp_method='average'
velocity_interp_method='rc'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down
Expand Up @@ -3,6 +3,10 @@ rho=1
advected_interp_method='average'
velocity_interp_method='average'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down
Expand Up @@ -3,6 +3,10 @@ rho=1
advected_interp_method='average'
velocity_interp_method='rc'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
file = diverging.msh
uniform_refine = 2
Expand Down
Expand Up @@ -6,6 +6,10 @@ vel = 'velocity'
velocity_interp_method = 'rc'
advected_interp_method = 'average'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down
Expand Up @@ -5,6 +5,7 @@ rho=1
vel = 'velocity'
velocity_interp_method = 'rc'
advected_interp_method = 'average'
two_term_boundary_expansion = true
[]

[Mesh]
Expand Down
Expand Up @@ -6,6 +6,10 @@ vel = 'velocity'
velocity_interp_method = 'rc'
advected_interp_method = 'average'

[GlobalParams]
two_term_boundary_expansion = true
[]

[Mesh]
[gen]
type = GeneratedMeshGenerator
Expand Down

0 comments on commit 5241ea2

Please sign in to comment.