fdpde_enthalpy - apusok/FD-PDE GitHub Wiki
FDPDEType: FDPDE_ENTHALPY
Advection-diffusion(-reaction) equation using the Enthalpy method
The Enthalpy Method is used for modelling the equilibrium thermodynamics of melting of a multi-component system (i.e., Alexiades and Solomon [1993], Katz [2008b]). A general coupled system for conservation of energy (with enthalpy as primary energy variable) and composition, together with pointwise closure equations for temperature, porosity, and fluid/solid compositions provided by the Enthalpy Method:
where the unknowns are $H$ - enthalpy, $T_p$ - primary temperature variable (for earth applications, $T_p$ is potential temperature), and $C$ - bulk composition. Other variables: $T$ - secondary temperature variable, $\phi$ - porosity, and $C_{f,s}$ are liquid and solid compositions. The variables in red are coefficients that need to be defined by the user in FormCoefficient()
.
Enthalpy method
The number of chemical components $N$ (default is a 2-component system) is specified with
FPDEEnthalpySetNumberComponentsPhaseDiagram(fd,N);
The closure equations using the Enthalpy method are specified with
FDPDEEnthalpySetEnthalpyMethod(fd,FormEnthalpy,description,usr);
Form_PotentialTemperature(T,P,&TP,usr);
FormEnthalpy()
has a similar structure and idea as FormCoefficient()
, but it is cellwise and is supposed to work in the following way: enthalpy method(H,C,P,&T,&phi,CF,CS,ncomp,user);
. It has inputs (H,C,P) and outputs (T,phi,CF,CS).
And to update the thermodynamic state, do:
FDPDEEnthalpyUpdateDiagnostics(fd,dm,x,&dmnew,&xnew);
Time-stepping schemes
The following time stepping schemes are implemented
TS_FORWARD_EULER
TS_BACKWARD_EULER
TS_CRANK_NICHOLSON
and are set with
FDPDEEnthalpySetTimeStepSchemeType(fd,timesteptype);
Advection schemes
The following advection schemes are implemented
ADV_UPWIND
ADV_UPWIND2
ADV_UPWIND_MINMOD
ADV_FROMM
and are set with
FDPDEEnthalpySetAdvectSchemeType(fd,advtype);
Please consult the Manual for theory and details on the time-stepping and advection schemes.
Tests for examples with FDPDE_ENTHALPY
SeeBack to User guide
Back to HOME