Skip to content

Commit

Permalink
Markdown Conversion for the rest of documentation files (#400)
Browse files Browse the repository at this point in the history
* Create MgNd_precipitate_single_Bppp.md

* Update and rename MgNd_precipitate_single_Bppp.md to precipitateEvolution_KKS.md

* Edit main title for consistency

* Update CHAC_anisotropy.md

* Update formulation_coupledCHAC.md

* Create allenCahn_conserved.md

* Update allenCahn_conserved.md

* Delete applications/allenCahn_conserved/tex_files directory

* Delete applications/allenCahn_conserved/allenCahn_conserved.pdf

* Create and prototype md file for alloySolidification

* Create alloySolidification_uniform.md prototype

* Create anisotropyFacet.md prototype

* Create cahnHilliard.md prototype

* Create corrosion.md prototype

* Create corrosion_microgalvanic.md prototype

* Create formulation_coupledCHAC.md prototype

* Create dendriticSolidification.md prototype

* Create eshelbyInclusion.md prototype

* Create formulation_fickianFlux.md prototype

* Create grainGrowth.md prototype

* Create mechanics.md prototype

* Create KKS_nucleation.md prototype

* Create formulation_precipitateEvolution.md prototype

* Small fix

* Finish alloySolidification.md

* Delete applications/alloySolidification/tex_files directory

* Delete applications/alloySolidification/alloySolidification.pdf

* Finish alloySolidification_uniform.md

* Delete applications/alloySolidification_uniform/tex_files directory

* Delete applications/alloySolidification_uniform/alloySolidification_uniform.pdf

* Finish anisotropyFacet.md

* Delete applications/anisotropyFacet/tex_files directory

* Delete applications/anisotropyFacet/anisotropyFacet.pdf

* Finish cahnHilliard.md

* Delete applications/cahnHilliard/tex_files directory

* Delete applications/cahnHilliard/formulation_cahnHillard.pdf

* Update corrosion.md

* Finish corrosion.md

* Delete applications/corrosion/tex_files directory

* Delete applications/corrosion/corrosion.pdf

* Finish corrosion_microgalvanic.md

* Delete applications/corrosion_microgalvanic/tex_files directory

* Delete applications/corrosion_microgalvanic/corrosion_microgalvanic.pdf

* Finish formulation_coupledCHAC.md

* Delete applications/coupledCahnHilliardAllenCahn/tex_files directory

* Delete applications/coupledCahnHilliardAllenCahn/formulation_coupledCHAC.pdf

* Update dendriticSolidification.md

* Update eshelbyInclusion.md

* Finish formulation_fickianFlux.md

* Delete applications/fickianDiffusion/tex_files directory

* Delete applications/fickianDiffusion/formulation_fickianFlux.pdf

* Finish grainGrowth.md

* Delete applications/grainGrowth/tex_files directory

* Delete applications/grainGrowth/grainGrowth.pdf

* Add files via upload

* Delete applications/grainGrowth_dream3d/grainGrowth.pdf

* Add files via upload

* Delete applications/grainGrowth_dream3d/tex_files directory

* Finish mechanics.md

* Delete applications/mechanics/tex_files directory

* Delete applications/mechanics/mechanics.pdf

* Add files via upload

* Delete applications/spinodalDecomposition/formulation_cahnHillard.pdf

* Finish dendriticSolidification.md

* Delete applications/dendriticSolidification/tex_files directory

* Delete applications/dendriticSolidification/dendriticSolidification.pdf

* Finish eshelbyInclusion.md

* Delete applications/eshelbyInclusion/tex_files directory

* Delete applications/eshelbyInclusion/eshelbyInclusion.pdf

* Finish KKS_nucleation.md

* Delete applications/nucleationModel/tex_files directory

* Delete applications/nucleationModel/KKS_nucleation.pdf

* Add files via upload

* Delete applications/nucleationModel_preferential/tex_files directory

* Delete applications/nucleationModel_preferential/KKS_nucleation.pdf

* Finish formulation_precipitateEvolution.md

* Delete applications/precipitateEvolution/tex_files directory

* Delete applications/precipitateEvolution/formulation_precipitateEvolution.pdf

* Add files via upload

* Automatics tests don't need model descriptions

---------

Co-authored-by: Jason Landini <[email protected]>
  • Loading branch information
danlwill and landinjm authored Jan 22, 2025
1 parent 850cdbf commit 15181c3
Show file tree
Hide file tree
Showing 63 changed files with 4,182 additions and 4,934 deletions.
2 changes: 1 addition & 1 deletion applications/CHAC_anisotropy/CHAC_anisotropy.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## PRISMS-PF: CHAC Anisotropy (with Coupled CH-AC Dynamics)
# PRISMS-PF: CHAC Anisotropy (with Coupled CH-AC Dynamics)
Consider a free energy expression of the form:

$$
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## PRISMS PhaseField: Regularized Anisotropy (with Coupled CH-AC Dynamics)
# PRISMS PhaseField: Regularized Anisotropy (with Coupled CH-AC Dynamics)

Consider a free energy expression of the form:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## PRISMS PhaseField: Coupled Cahn-Hilliard and Allen-Cahn Dynamics
# PRISMS PhaseField: Coupled Cahn-Hilliard and Allen-Cahn Dynamics

Consider a free energy expression of the form:

Expand Down
183 changes: 183 additions & 0 deletions applications/allenCahn_conserved/allenCahn_conserved.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# PRISMS PhaseField: Globally Conserved Allen-Cahn Dynamics

This application performs a phase field simulation of Allen-Cahn dynamics subject to global (as opposed to local) conservation. Global conservation implies that $\int_\Omega \eta \,dV$, where $\Omega$ is the volume of the system, is constant in time.

Note: This application needs to run with **uniform mesh** in order for the calculation of the chemical potential to be accurate.

Consider a free energy expression of the form:

$$
\begin{equation}
\Pi(\eta, \nabla \eta) = \int_{\Omega} f( \eta ) + \frac{\kappa}{2} \nabla \eta \cdot \nabla \eta ~dV,
\end{equation}
$$

where $\eta$ is the structural order parameter, and $\kappa$ is the gradient length scale parameter.

## Variational treatment

Considering variations on the primal field $\eta$ of the from $\eta+\epsilon w$, we have

$$
\begin{align}
\delta \Pi &= \left. \frac{d}{d\epsilon} \int_{\Omega} f(\eta+\epsilon w) + \frac{\kappa}{2} \nabla (\eta+\epsilon w) \cdot ~\nabla (\eta+\epsilon w) ~dV \right\vert_{\epsilon=0}
\end{align}
$$

$$
\begin{align}
&= \int_{\Omega} w f_{,\eta} + \kappa \nabla w \nabla \eta ~dV
\end{align}
$$

$$
\begin{align}
&= \int_{\Omega} w \left( f_{,\eta} - \kappa \Delta \eta \right) ~dV + \int_{\partial \Omega} w \kappa \nabla \eta \cdot n ~dS,
\end{align}
$$

where $f_{,\eta} = \partial f/\partial \eta$.

Assuming $\kappa \nabla \eta \cdot n = 0$, and using standard variational arguments on the equation $\delta \Pi =0$ we have the expression for chemical potential as

$$
\begin{equation}
\mu = f_{,\eta} - \kappa \Delta \eta.
\end{equation}
$$

## Kinetics
The Parabolic PDE for Allen-Cahn dynamics is given by:

$$
\begin{align}
\frac{\partial \eta}{\partial t} &= -M\mu,
\end{align}
$$

where $M$ is the constant mobility. However, the previous equation does not ensure global conservation of $\eta$. In order to achieve global conservation we can add a spatially-uniform term, $A$, to the RHS that effectively offsets the total change in $\eta$ such that $\int_\Omega \partial \eta / \partial t\,dV =0$:

$$
\begin{align}
\frac{\partial \eta}{\partial t} &= -M\mu+A.
\end{align}
$$

Applying the global conservation constraint to previous equation, we obtain

$$
\begin{align}
\int_\Omega \frac{\partial \eta}{\partial t}\,dV &= -\int_\Omega (M\mu-A) \,dV = 0.
\end{align}
$$

Since $A$ is spatially uniform and $M$ is a constant, $A$ given by

$$
\begin{align}
A &= \frac{M}{V}\int_\Omega \mu \,dV.
\end{align}
$$

Subsituting $A$ from

$$
\begin{align}
A &= \frac{M}{V}\int_\Omega \mu \,dV.
\end{align}
$$

into

$$
\begin{align}
\frac{\partial \eta}{\partial t} &= -M\mu+A.
\end{align}
$$

we get

$$
\begin{align}
\frac{\partial \eta}{\partial t} &= -M(\mu-\bar{\mu}),
\end{align}
$$

where $\bar{\mu} = (1/V)\int_\Omega \mu \,dV$.

## Time discretization
Considering forward Euler explicit time stepping, we have the time discretized kinetics equations:

$$
\begin{align}
\eta^{n+1} &= \eta^{n} - \Delta t M(\mu^n-\bar{\mu}^n)
\end{align}
$$

and

$$
\begin{align}
\mu^{n+1} &= f_{,\eta}^n - \kappa \Delta \eta^n.
\end{align}
$$

## Weak formulation
In the weak formulation, considering an arbitrary variation $w$, the above equation can be expressed as a residual equations:

$$
\begin{align}
\int_{\Omega} w \eta^{n+1} ~dV&= \int_{\Omega} w [ \eta^{n} - \Delta t M(\mu^n-\bar{\mu}^n) ]~dV
\end{align}
$$

$$
\begin{align}
r_{\eta} &= \eta^{n} - \Delta t M(\mu^n-\bar{\mu}^n)
\end{align}
$$

and

$$
\begin{align}
\int_{\Omega} w \mu^{n+1} ~dV&= \int_{\Omega} [w f_{,\eta}^n - w \kappa \Delta \eta^{n}]~dV
\end{align}
$$

$$
\begin{align}
&= \int_{\Omega} w ( f_{,\eta}^{n} ) + \nabla w \cdot (\kappa \nabla \eta^{n}) ~dV,
\end{align}
$$

$$
\begin{align}
r_{\mu x} &= \kappa \nabla \eta^{n}
\end{align}
$$

$$
\begin{align}
r_{\mu} &= f_{,\eta}^{n}
\end{align}
$$

where the reference chemical potential $\bar{\mu}^n$ for time step $n$ in

$$
\begin{align}
\int_{\Omega} w \eta^{n+1} ~dV&= \int_{\Omega} w [ \eta^{n} - \Delta t M(\mu^n-\bar{\mu}^n) ]~dV
\end{align}
$$

is calculated as

$$
\begin{align}
\bar{\mu}^n& = \frac{1}{V}\int_\Omega \mu^n ~dV.
\end{align}
$$

The above values of $r_{\eta}$, $r_{\mu}$, and $r_{\mu x}$ are used to define the residuals in the following parameters file:
`\textit{applications/allenCahn\_conserved/equations.cc`
Binary file not shown.
Loading

0 comments on commit 15181c3

Please sign in to comment.