PenguinTransport.jl

PenguinTransport.jl solves cut-cell advection transport problems on Cartesian grids with fixed and moving embedded interfaces. It provides mono and two-phase models, with fixed-geometry steady/unsteady assembly and moving-geometry unsteady slab assembly.

The conservative transport equation is:

\[\partial_t \phi + \nabla\cdot(\mathbf{u}\,\phi) = s,\]

with steady limit

\[\nabla\cdot(\mathbf{u}\,\phi) = s\]

Within PenguinxCutCell, PenguinTransport.jl sits on top of:

  • CartesianGeometry.jl for cut-cell moments,
  • CartesianOperators.jl for advection operators,
  • PenguinBCs.jl for boundary-condition types,
  • PenguinSolverCore.jl for linear solves.

Implemented Today

AreaItemStatusNotes
ModelsMonophase steadyImplementedTransportModelMono + assemble_steady_mono!
ModelsMonophase unsteadyImplementedTheta-form assembly via assemble_unsteady_mono!
ModelsTwophase steadyImplementedTransportModelTwoPhase + assemble_steady_two_phase!
ModelsTwophase unsteadyImplementedTheta-form assembly via assemble_unsteady_two_phase!
ModelsMoving monophase unsteadyImplementedMovingTransportModelMono + assemble_unsteady_mono_moving!
ModelsMoving twophase unsteadyImplementedMovingTransportModelTwoPhase + assemble_unsteady_two_phase_moving!
AdvectionCentered schemeImplementedCentered() spatial discretization
AdvectionUpwind schemeImplementedUpwind1() first-order upwind
Time schemesBackward EulerImplementedtheta=1
Time schemesCrank–NicolsonImplementedtheta=0.5
Time schemesGeneral thetaImplementedNumeric theta with 0 ≤ theta ≤ 1
Outer BCsInflowImplementedDirichlet-type boundary condition
Outer BCsOutflowImplementedNeumann-type boundary condition
Outer BCsPeriodicImplementedPeriodic boundary condition
Embedded interfaceSign-based closureImplementedFixed: sign from discrete κ (from ops.K); Moving: sign from discrete relative κrel (built with uγ-wγ)

Pages

  • Transport Models: PDEs, sign conventions, callback layout, time-scheme contract.
  • Algorithms: unknown layouts, block assembly, theta-step construction, row regularization.
  • API: public constructors/functions and state-layout contracts.
  • Examples: curated scripts and verification map.

Quick Start

using CartesianGeometry: geometric_moments, nan
using CartesianOperators
using PenguinBCs
using PenguinTransport

full_moments(grid) = geometric_moments((args...) -> -1.0, grid, Float64, nan; method=:vofijul)

grid = (0.0:0.05:1.0,)
cap = assembled_capacity(full_moments(grid); bc=0.0)
nt = cap.ntotal

bc = BorderConditions(; left=Periodic(), right=Periodic())
uω = (ones(nt),)
uγ = (ones(nt),)

model = TransportModelMono(cap, uω, uγ; bc_border=bc, scheme=Centered())
res = solve_unsteady!(model, zeros(nt), (0.0, 0.2); dt=0.01, scheme=:CN)

Moving quick-start APIs are MovingTransportModelMono, MovingTransportModelTwoPhase, and solve_unsteady_moving! (see API and Examples).

Local Docs Build

julia --project=docs -e 'using Pkg; Pkg.instantiate()'
julia --project=docs docs/make.jl