Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev-0.3-main' into dev-0.3/code-…
Browse files Browse the repository at this point in the history
…cleanup
  • Loading branch information
mberto79 committed Aug 30, 2024
2 parents 8805612 + 5fcd992 commit 244baae
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Solvers/Solvers_1_SIMPLE_comp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ export simple_comp!
Compressible variant of the SIMPLE algorithm with a sensible enthalpy transport equation for
the energy.
### Input
- `model in` -- Physics model defiend by user and passed to run!.
- `config` -- Configuration structure defined by user with solvers, schemes, runtime and
hardware structures set.
- `resume` -- True or false indicating if case is resuming or starting a new simulation.
- `pref` -- Reference pressure value for cases that do not have a pressure defining BC.
### Output
- `R_ux` - Vector of x-velocity residuals for each iteration.
- `R_uy` - Vector of y-velocity residuals for each iteration.
- `R_uz` - Vector of y-velocity residuals for each iteration.
- `R_p` - Vector of pressure residuals for each iteration.
- `R_e` - Vector of energy residuals for each iteration.
- `model` - Physics model output including field parameters.
"""
simple_comp!(model_in, config; resume=true, pref=nothing) = begin
R_ux, R_uy, R_uz, R_p, R_e, model = setup_compressible_solvers(
Expand Down
21 changes: 21 additions & 0 deletions src/Solvers/Solvers_2_PISO_comp.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
export piso_comp!

"""
piso_comp!(model_in, config; resume=true, pref=nothing)
Compressible variant of the PISO algorithm with a sensible enthalpy transport equation for
the energy.
### Input
- `model in` -- Physics model defiend by user and passed to run!.
- `config` -- Configuration structure defined by user with solvers, schemes, runtime and
hardware structures set.
- `resume` -- True or false indicating if case is resuming or starting a new simulation.
- `pref` -- Reference pressure value for cases that do not have a pressure defining BC.
### Output
- `R_ux` - Vector of x-velocity residuals for each iteration.
- `R_uy` - Vector of y-velocity residuals for each iteration.
- `R_uz` - Vector of y-velocity residuals for each iteration.
- `R_p` - Vector of pressure residuals for each iteration.
- `model` - Physics model output including field parameters.
"""
piso_comp!(model_in, config; resume=true, pref=nothing) = begin

R_ux, R_uy, R_uz, R_p, R_e, model = setup_unsteady_compressible_solvers(
Expand Down
84 changes: 84 additions & 0 deletions src/Solvers/Solvers_3_solver_dispatch.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
export run!

# Incompressible solver (steady)
"""
run!(
model::Physics{T,F,M,Tu,E,D,BI}, config; pref=nothing
) where{T<:Steady,F<:Incompressible,M,Tu,E,D,BI}
Incompressible steady solver using the SIMPLE algorithm.
### Input
- `model` -- Physics model defiend by user and passed to run!.
- `config` -- Configuration structure defined by user with solvers, schemes, runtime and
hardware structures set.
- `pref` -- Reference pressure value for cases that do not have a pressure defining BC.
### Output
- `R_ux` - Vector of x-velocity residuals for each iteration.
- `R_uy` - Vector of y-velocity residuals for each iteration.
- `R_uz` - Vector of y-velocity residuals for each iteration.
- `R_p` - Vector of pressure residuals for each iteration.
- `model` - Physics model output including field parameters.
"""
run!(
model::Physics{T,F,M,Tu,E,D,BI}, config; pref=nothing
) where{T<:Steady,F<:Incompressible,M,Tu,E,D,BI} =
Expand All @@ -10,6 +30,26 @@ begin
end

# Incompressible solver (transient)
"""
run!(
model::Physics{T,F,M,Tu,E,D,BI}, config; pref=nothing
) where{T<:Transient,F<:Incompressible,M,Tu,E,D,BI}
Incompressible unsteady solver using the PISO algorithm.
### Input
- `model` -- Physics model defiend by user and passed to run!.
- `config` -- Configuration structure defined by user with solvers, schemes, runtime and
hardware structures set.
- `pref` -- Reference pressure value for cases that do not have a pressure defining BC.
### Output
- `R_ux` - Vector of x-velocity residuals for each iteration.
- `R_uy` - Vector of y-velocity residuals for each iteration.
- `R_uz` - Vector of y-velocity residuals for each iteration.
- `R_p` - Vector of pressure residuals for each iteration.
- `model` - Physics model output including field parameters.
"""
run!(
model::Physics{T,F,M,Tu,E,D,BI}, config; pref=nothing
) where{T<:Transient,F<:Incompressible,M,Tu,E,D,BI} =
Expand All @@ -19,6 +59,28 @@ begin
end

# Weakly Compressible solver (steady)
"""
run!(
model::Physics{T,F,M,Tu,E,D,BI}, config; pref=nothing
) where{T<:Steady,F<:WeaklyCompressible,M,Tu,E,D,BI}
Mildly compressible steady solver using the SIMPLE algorithm for low speed cases with heat
transfer.
### Input
- `model` -- Physics model defiend by user and passed to run!.
- `config` -- Configuration structure defined by user with solvers, schemes, runtime and
hardware structures set.
- `pref` -- Reference pressure value for cases that do not have a pressure defining BC.
### Output
- `R_ux` - Vector of x-velocity residuals for each iteration.
- `R_uy` - Vector of y-velocity residuals for each iteration.
- `R_uz` - Vector of y-velocity residuals for each iteration.
- `R_p` - Vector of pressure residuals for each iteration.
- `R_e` - Vector of energy residuals for each iteration.
- `model` - Physics model output including field parameters.
"""
run!(
model::Physics{T,F,M,Tu,E,D,BI}, config; pref=nothing
) where{T<:Steady,F<:WeaklyCompressible,M,Tu,E,D,BI} =
Expand All @@ -37,6 +99,28 @@ begin
end

# Weakly Compressible solver (transient)
"""
run!(
model::Physics{T,F,M,Tu,E,D,BI}, config; pref=nothing
) where{T<:Transient,F<:WeaklyCompressible,M,Tu,E,D,BI}
Mildly compressible unsteady solver using the PISO algorithm for low speed cases with heat
transfer.
### Input
- `model` -- Physics model defiend by user and passed to run!.
- `config` -- Configuration structure defined by user with solvers, schemes, runtime and
hardware structures set.
- `pref` -- Reference pressure value for cases that do not have a pressure defining BC.
### Output
- `R_ux` - Vector of x-velocity residuals for each iteration.
- `R_uy` - Vector of y-velocity residuals for each iteration.
- `R_uz` - Vector of y-velocity residuals for each iteration.
- `R_p` - Vector of pressure residuals for each iteration.
- `R_e` - Vector of energy residuals for each iteration.
- `model` - Physics model output including field parameters.
"""
run!(
model::Physics{T,F,M,Tu,E,D,BI}, config
) where{T<:Transient,F<:WeaklyCompressible,M,Tu,E,D,BI} =
Expand Down

0 comments on commit 244baae

Please sign in to comment.