Material Model
HSSSimulations.Material
— ModuleContains a concrete material property type, the functions for running the material model, and an example material using this model and data collected from measuring PA2200.
PA2200
HSSSimulations.Material.PA_κ
— FunctionValues from Yaun 2014 used for consolidation state of 0 and 1 (at a melt state of 0). And values from Riedlbaur 2015 (I think originally from Rietzel 2011, but my German isn't good enough to confirm) used for a melt state of 1.
HSSSimulations.Material.PA_ρ
— FunctionAssumes density is constant across temperatures and at data sheet values for maximum consolidation state. For consolidation and melt state zero, the measured value of the powder in the machine is used. The melted density is based on observations while taking dilatometry measurments.
HSSSimulations.Material.PA_c
— FunctionData taken from stepscan of PA2200, processed by perkin-elmer dsc software. Melt region is interpolated over to avoide issuse with .
HSSSimulations.Material.PA_Mᵣ
— FunctionA normalized cumulative integral of the energy in to a system during melting from a DSC curves.
HSSSimulations.Material.PA_Rᵣ
— FunctionA normalized cumulative integral of the energy out of a system during recrystallization from DSC curves. With each curve taken from increasing melt states.
HSSSimulations.Material.PA_Hf
— FunctionThe difference between the energy in to the system during melting (from a DSC curve), and an interpolated line drawn between the sections of heating outside of the melt region.
HSSSimulations.Material.PA_Hr
— FunctionThe difference between the energy out of the system during crystallization (from a DSC curve), and an interpolated line drawn between the sections of cooling outside of the recrystallization region.
HSSSimulations.Material.PA_Ċ
— FunctionBased on model from Childs and Tontowi 2001. Modified to work off of consolidation and melt states. Calibrated from dilatometry data. See Material.Ċ_maker
for how to make your own.
HSSSimulations.Material.PA_eₚ
— ConstantTaken from near ir experiments.
HSSSimulations.Material.PA_eᵢ
— ConstantTaken from near ir experiments.
HSSSimulations.Material.PA_ε
— ConstantTaken from pyrometer calibrations.
New Materials Using the Default Model
HSSSimulations.Material.MatProp
— Typestruct MatProp{T1, T2, T3, T4, T5, T6, T7, T8, T9} <: AbstractMatProp
The default implementation of AbstractMatProp
used by the default Material.calcMatProps!
method. See PA2200 for an exmaple of a premade materials. The arguments to its constructor are the same as the matching fields. The only addition is the geometry argument, which should just be the Geometry
struct of for the simulation.
The default material model behaviour can be used to simulate similar materials by simply changing the contents of this struct. The PA2200 section should provide some ideas on how to measure these values.
If the same consolidation model is used, Ċ_maker
can be used to make a new consolidation rate function with new coefficients.
The maximum melt state is never reset, so if a node goes from the melt region to the recrystalisation region more than once in a simulation, the behaviour might not be modeled properly.
Fields
ρ::Any
: Density. Two dimensional interpolations, with inputs in axis 1 = consolidation state, axis 2 = melt state.
c::Any
: Specific heat capacity. One dimensional interpolations with the node's temperature as it's input.
κ::Any
: Thermal conductivity. Three dimensional interpolations, with inputs in axis 1 = consolidation state, axis 2 = temperature and axis 3 = melt state.
Mᵣ::Any
: Melting range and temp relationship. A 1d interpolation, with the only input axis being the temperature and the output is the melt state.
Mₛ::Float64
: The start temperature of the melt rangeMₑ::Float64
: The end temperature of the melt rangeRᵣ::Any
: Crystallisation range and temp relationship. A 2d interpolation, with the first input axis being the node temperature and the second input axis being the maximum melt state reached. The output is the melt state.
Rₛ::Float64
: The start temperature of the recrystalisation rangeRₑ::Float64
: The end temperature of the recrystalisation rangeHf::Any
: Total specific heat of meltingHr::Any
: Total specific heat of fusion. A 1d Interpolation where the input is the maximum melt state reached and the output is the total heat of fusion.
Ċ::Any
: Consolidation rate. Either a single value representing a constant consolidation rate, or a 2d interpolation, with the first axis being the node temperature and the second being the node melt state. The output is the rate of change of sinter state.
eₚ::Float64
: Emmisivity of the powder. This is the emmisivity relative to the lamp. So the emmisivity over the range of the wavelengths that the lamp outputs, scaled by the relative output power of the lamp at those wavelengths.
eᵢ::Float64
: Emmisivity of the powder with ink on it. This is the emmisivity relative to the lamp. So the emmisivity over the range of the wavelengths that the lamp outputs, scaled by the relative output power of the lamp at those wavelengths.
ε::Float64
: Black body emmisivity of the powdername::String
: Just used for future referenceMₘ::Any
: Used by the material model to track the maximum melt state reached per node
HSSSimulations.Material.MatProp
— MethodMatProp(
ρ,
c,
κ,
Mᵣ,
Rᵣ,
Hf,
Hr,
Ċ,
eₚ,
eᵢ,
ε,
name,
geometry
) -> MatProp
Default constructor for MatProp
.
HSSSimulations.Material.Ċ_maker
— FunctionBased on model from Childs and Tontowi 2001. Modified to work off of consolidation and melt states . Takes three coefficients ($βₛ, Aₛ, nₛ$) and returns a consolidation rate calculator that . follows the equation below .
\[\dot{C} = (1-C^{t-1}) A_s \exp{\left(-\frac{E_s}{RT^{t-1}} - \beta_s (1-M^{t-1})^{n_s}\right)}\]
Where $C^{t-1}$ is the previous consolidation state, $M^{t-1}$ is the previous melt state, and $T^{t-1}$ is the previous temperature.
Modifying the Current Material Model
HSSSimulations.Material.calcMatProps!
— MethodcalcMatProps!(
pts::AbstractResult,
cts::AbstractResult,
prob::Problem{T, Gh, Mp<:AbstractMatProp, R, OR, B},
ind
)
The default material model, designed to be used with MatProp
, but should work with any Types.AbstractMatProp
that shares MatProp
's ρ
, c
, κ
and Mₘ
fields.
Updates melt and consolidation state, and then uses those to update the density, heat capacity and conductivity. These are then used to calculate the Fourier number for each axis for this time step.
The meltUpdate
and consUpdate
state updater of the default material model can be modified separately from the this function itself. The default methods are meltUpdate
and consUpdate
. An example of this can be seen in Tutorial 3: A Melt Rate Based Material Model.
HSSSimulations.Material.meltUpdate
— FunctionmeltUpdate(Mᵗ⁻¹, T, Mₘ, Δt, mp::AbstractMatProp) -> Mᵗ, Mₘ, Δh
Calculates the new melt state of a single node. It is given the melt state and temperature of the node in the previous time step, the maximum melt state the node has reached so far, the duration of the current time step and the material property struct.
It should return the new melt state for the node, the new maximum melt state, and the specific enthalpy change due to fusion or recrystalisation that is associated with the change in melt state.
HSSSimulations.Material.meltUpdate
— MethodmeltUpdate(
Mᵗ⁻¹,
T,
Mₘ,
_,
mp::AbstractMatProp
) -> Tuple{Any, Any, Any}
Updates the melt state of a node if the temperature of the node is in the melting or crystalisation termperature range if not the existing value is returned. This uses a basic time independent model that associates a single melt state to a given combination of temperature and maximum melt state reached so far.
HSSSimulations.Material.consUpdate
— FunctionconsUpdate(C, M, T, Δt, mp::AbstractMatProp) -> C
Calculates the new consolidation state of a single node. It is given the current consolidation state, melt state and temperature of the node, the duration of the current time step and the material property struct.
HSSSimulations.Material.consUpdate
— MethodconsUpdate(C, M, T, Δt, mp::AbstractMatProp) -> Any
Updates the consolidation state of a node by adding the change in consolidation state (rate * time) to the previous consolidation state. Only applies if the material is melted and not already fully consolidated.
This finds the consolidation rate by calling mp.Ċ
with C
, T
and M
as arguments.
The returned values maximum is limited to 1.
Making a New Material Model
HSSSimulations.Types.AbstractMatProp
— Typeabstract type AbstractMatProp <: HSSSimulations.Types.AbstractSimProperty
The abstract type that any material property struct needs to be a subtype of. These are for storing the values used to define the properties of a material, and those used to calculate the changes in material properties due to the build. The default struct used is MatProp
, however new subtypes can be defined and used by defining a new Material.calcMatProps!
function. This allows for the simplificiation (or complication) of the material model used in the simulation to fit your needs.
Any new subtype will need it's own method writen for calcMatProps!
and if the example boundaries are being used some of them might need to be updated to use the new material properties. If melt state or consolidation state are beind removed from the material model then it might be worth implementing a new AbstractResult
to save on memory. If an additional property that needs to be tracked is added to the material model then it will be necissary to implement a new subtype of those to track this.
See Material Model Recipes and Tutorial 3: A Melt Rate Based Material Model for more information on implementing your own.
HSSSimulations.Material.calcMatProps!
— FunctioncalcMatProps!(::AbstractResult, ::AbstractResult, <:Problem, ::Indices)
Updates any of the material properties that change, along with the Fourier number for the current time step. New methods can be defined by dispatching on Problem
with a different subtype of MatProp (for more information on this, see Types.AbstractMatProp
). The two main functions called by this one, meltUpdate
and consUpdate
, are both also dispatched on the type of the material property struct, so they can be overwritten individually for a new material property struct if the new material model only needs to change some of the behaviour.
Arguments
cts
: Current time step resultspts
: Previous time step resultsind
: The indicies to update