Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Oct 31, 2024
1 parent dff60fb commit 49e6acd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/Applications/cavity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,19 @@ function _cavity(;
order = 2,
order_j = order,
formulation = :mhd,
initial_value = :zero,
rt_scaling = false,
title="Cavity",
path=datadir(),
solver=:julia,
ranks_per_level=nothing,
verbose=true,
vtk=true,
convection=false,
closed_cavity=true
)
@assert formulation [:cfd,:mhd]
@assert initial_value [:zero,:solve]

info = Dict{Symbol,Any}()
params = Dict{Symbol,Any}(
Expand Down Expand Up @@ -116,6 +120,7 @@ function _cavity(;
:f => f̄,
:B => B̄,
=> ζ,
:convection => convection,
)

# FESpaces and Boundary conditions
Expand All @@ -128,6 +133,8 @@ function _cavity(;
:rt_scaling => rt_scaling ? 1.0/get_mesh_size(model) : nothing
)

params[:x0] = initial_value

if closed_cavity
params[:bcs] = Dict{Symbol,Any}(
:u => Dict(:tags => ["cavity", "lid"], :values => [uw, ul]),
Expand Down
4 changes: 4 additions & 0 deletions src/Applications/expansion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function _expansion(;
)
@assert solid_coupling [:none,:thin_wall,:solid]
@assert inlet [:parabolic,:shercliff,:constant]
@assert initial_value [:zero,:inlet,:solve]
@assert formulation [:cfd,:mhd]

info = Dict{Symbol,Any}()
params = Dict{Symbol,Any}(
Expand Down Expand Up @@ -179,6 +181,8 @@ function _expansion(;
params[:x0] = Dict(
:u=>u_in,:j=>j_zero,:p=>0.0,=>0.0
)
else
params[:x0] = initial_value
end

# Solver options
Expand Down
7 changes: 6 additions & 1 deletion src/Applications/hunt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,16 @@ function _hunt(;
solve = true,
solver = :julia,
formulation = :mhd,
initial_value = :zero,
rt_scaling = false,
verbose = true,
BL_adapted = true,
kmap_x = 1,
kmap_y = 1,
ranks_per_level = nothing
)
@assert formulation [:cfd,:mhd]
@assert initial_value [:zero,:solve]

info = Dict{Symbol,Any}()
params = Dict{Symbol,Any}(
Expand Down Expand Up @@ -163,6 +166,8 @@ function _hunt(;
:j => Dict(:tags=>"insulating"),
)

params[:x0] = initial_value

if μ > 0
params[:bcs][:stabilization] = Dict(=>μ)
end
Expand Down Expand Up @@ -209,7 +214,7 @@ function _hunt(;
u_ref(x) = analytical_hunt_u(L,L,μ,grad_pz,Ha,2*nsums,x)
j_ref(x) = analytical_hunt_j(L,L,σ,μ,grad_pz,Ha,2*nsums,x)

dΩ_phys = Measure(Ω_phys,order*(k+1))
dΩ_phys = Measure(Ω_phys,2*(order+1))
eu = u - uh
ej = j - jh
eu_h1 = sqrt(sum(( (eu)(eu) + eueu )dΩ_phys))
Expand Down

0 comments on commit 49e6acd

Please sign in to comment.