Skip to content
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

Add charge conservative MHD implementation & fixes to build issues (netgen, jinja2) #38

Merged
merged 43 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
05b4c34
Add 2D Navier-Stokes 2nd order lagrange velocity 1st order monomial p…
rweardley May 14, 2024
eb28f79
Add penalty Dirichlet BC
rweardley May 14, 2024
7c744bd
Add initial 3D NS element type test case
rweardley May 14, 2024
1528f98
Fix missing no-slip BCs, change element types, change executioner opt…
rweardley May 14, 2024
9ad4044
Initial Lorentz force kernel implementation
rweardley May 14, 2024
a4c4fff
Add current and Lorentz force kernel
rweardley May 14, 2024
6328057
Add automatic scaling, remove function ICs, reduce x resolution
rweardley May 15, 2024
e6a1ced
Rename files
rweardley May 16, 2024
b8d5795
Add INS (non-AD) version
rweardley May 16, 2024
226506f
Tidy up case file directory structure
rweardley May 16, 2024
0982349
Delete non-functional 2d Lorentz force case, add 3d case
rweardley May 16, 2024
efbead4
Fix incorrect sign of Lorentz force term (opposite orientation)
rweardley May 16, 2024
1a92167
Testing traction form of viscous momentum term
rweardley May 16, 2024
084f7f3
Switch back to default laplace form of viscous equation due to concer…
rweardley May 16, 2024
82efbfd
Add initial electrostatic implementation
rweardley May 16, 2024
013121a
Add new 2d electrostatic test cases and update 3d electrostatic case
rweardley May 20, 2024
528e1a3
Add missing function argument to VectorBodyForce kernel
rweardley May 21, 2024
1748311
Add UxB electric potential coupling term and test case
rweardley May 21, 2024
6c40b37
Add WIP fully coupled example
rweardley May 22, 2024
7bdf6c8
Rename fully coupled case (previous name incorrectly included AuxVelo…
rweardley May 23, 2024
0a14084
Change sign of IMHDADCurrentUxB residual
rweardley May 24, 2024
0637ea6
Add WIP INSADAugmentedLagrangian kernel
rweardley May 24, 2024
b4cc3f9
Delete INSADAugmentedLagrangian kernels; found INSADMomentumGradDiv a…
rweardley May 24, 2024
6a94965
Increase y resolution for higher Ha cases, add optional FSP precondit…
rweardley May 24, 2024
c2e8b1f
Add augmented Lagrangian terms for velocity and current density to de…
rweardley May 24, 2024
3845e22
Remove AL terms
rweardley May 24, 2024
e46eed7
Switch Lorentz force kernel to use a vector function for B rather tha…
rweardley May 30, 2024
b1cdd52
Update to use new version of Lorentz force kernel
rweardley May 30, 2024
24c56b7
Switch UxB kernel to use vector function for B, update coupled example
rweardley Jun 4, 2024
d0670e1
Specify shercliff case in coupled example filename
rweardley Jun 6, 2024
2346dfe
Switch to LAGRANGE FIRST pressure
rweardley Jun 6, 2024
5632539
Disable automatic scaling, remove resolved comments about uncertainty…
rweardley Jun 6, 2024
56b21fc
Add Hunt case
rweardley Jun 6, 2024
f865e2a
Add zero value condition for electricPotential
rweardley Aug 21, 2024
9fb60b0
Add zero-divergence check
rweardley Aug 21, 2024
d8ce7cd
Increase AD derivative size to 89 (required for charge conservative M…
rweardley Oct 22, 2024
4f5d3da
Add jinja2 dependency
rweardley Oct 23, 2024
e91ede4
Remove NSFVBase.patch (no longer required)
rweardley Oct 23, 2024
34fff53
Add --disable-netgen flag to libMesh
rweardley Oct 23, 2024
725dca2
Clarify magneticFieldFunction argument descriptions
rweardley Oct 23, 2024
845d449
Remove FSP preconditioning option; currently not working
rweardley Oct 23, 2024
9999b1b
Update case to work with magnetic field changes (AuxVariable to funct…
rweardley Oct 23, 2024
b8bac39
Add comments on issues with running these cases
rweardley Oct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# Note: if this is run on 1 core only, ILU is not used
# And instead a method requiring more iterations is applied.

N_X = 200
N_Y_half = 10
U_AVG = 1
element_type = 'QUAD9'

[Mesh]
[meshTop]
type = GeneratedMeshGenerator
dim = 2
nx = ${N_X}
ny = ${N_Y_half}
xmin = 0
xmax = 20
ymin = 0
ymax = 1
bias_y = 0.8
boundary_name_prefix = 'meshTop'
elem_type = ${element_type}
[]
[meshBottom]
type = GeneratedMeshGenerator
dim = 2
nx = ${N_X}
ny = ${N_Y_half}
xmin = 0
xmax = 20
ymin = -1
ymax = 0
bias_y = 1.25
boundary_name_prefix = 'meshBottom'
elem_type = ${element_type}
[]
[meshComplete]
type = StitchedMeshGenerator
inputs = 'meshTop meshBottom'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'meshTop_bottom meshBottom_top'
[]
[meshRename]
type = RenameBoundaryGenerator
input = meshComplete
old_boundary = '
meshTop_right meshBottom_right
meshTop_left meshBottom_left
meshTop_top
meshBottom_bottom
'
new_boundary = '
right right
left left
top
bottom
'
[]
[]

[Variables]
[velocity]
family = LAGRANGE_VEC
order = SECOND
[]
[pressure]
family = MONOMIAL
order = FIRST
[]
[]

# [ICs]
# [velocity]
# type = VectorFunctionIC
# variable = velocity
# function = velocityInlet
# []
# []

[Functions]
[velocityInlet]
type = ParsedVectorFunction
symbol_names = 'y_max'
symbol_values = '1'
expression_x = '(3/2) * ${U_AVG} * (1 - (y * y) / (y_max * y_max))'
expression_y = '0'
[]
[]

[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = left
function = velocityInlet
[]
[no_slip]
type = VectorDirichletBC
variable = velocity
boundary = 'top bottom'
values = '0 0 0'
[]
[pressure_set]
type = PenaltyDirichletBC
variable = pressure
value = 0
boundary = 'right'
penalty = 1e5
[]
# [pressure_set]
# type = DirichletBC
# variable = pressure
# boundary = 'right'
# value = 0
# []
[]

[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = pressure
[]
[]

[Kernels]
[mass]
type = INSADMass
variable = pressure
[]

[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[]

[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[]

[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = pressure
integrate_p_by_parts = true
[]
[]

[Problem]
type = FEProblem
[]

[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]

[Executioner]
type = Steady
solve_type = NEWTON
l_max_its = 100
nl_max_its = 1000
petsc_options_iname = '-pc_type'
petsc_options_value = 'ilu'
[]

[Outputs]
exodus = true
[]
Loading
Loading