Problem and solution
See the User Guide's problem-building chapter for the simulation-mode axes, and the solution chapter for post-processing.
Pyrolysis.Problem.PyrolysisProblem — Type
PyrolysisProblem{M,Mat,BCS,FT,Fξ} <: AbstractPyrolysisProblemComplete specification of a pyrolysis simulation problem.
Type Parameters
M: Mesh typeMat: Material typeBCS: BoundaryConditionSet type (type-stable BC storage)FT: Initial temperature function typeFξ: Initial concentration functions type
Fields
mesh::M: The computational meshmaterial::Mat: Material definition with components and reactionsbc_set::BCS: BoundaryConditionSet with all boundary conditions (type-stable)T_initial::FT: Initial temperature function z -> T(z)ξ_initial::Vector{Fξ}: Initial concentration functions [z -> ξⱼ(z)]tspan::Tuple{Float64,Float64}: Simulation time span (tstart, tend)dt_initial::Float64: Initial timestep [s]output_times::Vector{Float64}: Times at which to save output
Example
bc_set = BoundaryConditionSet(
thermal = (top = HeatFluxBC(50e3), bottom = AdiabaticBC()),
mass = (top = ConvectiveMassBC(h_m = 0.01), bottom = ImpermeableBC()),
)
problem = PyrolysisProblem(
mesh = create_uniform_mesh(0.01, 100, 2),
material = pmma,
bc_set = bc_set,
T_initial = z -> 300.0,
ξ_initial = [z -> 1190.0, z -> 0.0],
tspan = (0.0, 100.0)
)Pyrolysis.Problem.PyrolysisSolution — Type
PyrolysisSolution{P, ExtraT} <: AbstractPyrolysisSolutionContainer for pyrolysis simulation results, organized as a fixed core schema of concretely-typed fields plus a typed extras NamedTuple for opt-in diagnostics.
Core fields
problem::P: Reference to the original problemt::Vector{Float64}: Solution times [s]T::Matrix{Float64}: Temperature profiles, shape(n_cells, n_steps)[K]ξ::Array{Float64,3}: Concentration profiles, shape(NC, n_cells, n_steps)[kg/m³]z::Matrix{Float64}: Node positions, shape(n_nodes, n_steps)[m]; an empty0×0matrix in Eulerian modesurface_T::Vector{Float64}: Surface temperature at each saved time [K]mass_loss_rate::Vector{Float64}: Surface MLR per current areaA(t)[kg/(m²·s)]energy_residual::Vector{Float64}: Energy-conservation residual; zeros when the conservation tracker is disabledretcode::Symbol: Return code from ODE solversolve_time::Float64: Wall-clock solve time [s]raw_solution: Raw DifferentialEquations.jl solution object (interpolation source)extras::ExtraT: Typed NamedTuple of opt-in diagnostics (see below)
Extras
extras aggregates secondary diagnostics keyed by symbolic name. Vectors inside extras are mutable, so the per-step extraction code and the diagnostics callback write through the NamedTuple in place. Names: gas_generation_rate, back_temperature, total_mass, thickness_history, surface_mass_flux, surface_heat_flux_{net,absorbed,reradiation,convection, conduction,transpiration}, surface_emissivity, surface_conductivity, back_heat_flux, MLR_gauge, cross_section_area_history, diagnostics_log.
Accessors
state_t = sol(t) # interpolate raw solution at time t
T_profile = sol.T[:, i] # temperature profile at saved time i
T_surface = sol.surface_T[i] # surface temperature at saved time i
mlr = sol.mass_loss_rate[i]
mlr_gauge = sol.extras.MLR_gauge[i]