User-defined Plugin: Pure Solidification
|
An example phase-field model of solidification. More...
#include <user_pfm_pure_solidification.h>
Inherits I_PFM_APP_Interface.
Public Member Functions | |
user_pfm_solidification () | |
~user_pfm_solidification () | |
void | load_arguments (PF_ARGS *m_args, char *msg_char) |
void | run_pfm_calculation (char *msg) |
bool | sdk_update_prop (string &msg, int ip) |
bool | model_update_PFDB_parameters () |
This method updates the dynamic parameters of the plugin which can evolve with time. More... | |
void | sdk_get_chemical_mobility (double(*chemical_mobility)[PDN_BSZ][PDN_BSZ], double(*atomic_mobility), double(*composition)) |
void | model_allocate_memory () |
bool | model_initial_condition (string input_path, string irun="circle") |
void | update_phase_equilibrium () |
double | model_get_driving_force () |
void | model_update_laplace_operation (VectorMesh< double > &field, VectorMesh< double > &lap_field, int index) |
void | model_update_rate (int index) |
bool | model_update_field (double dt) |
An example phase-field model of solidification.
Constructor: user_pfm_solidification::user_pfm_solidification();
Destructor: user_pfm_solidification::~user_pfm_solidification();
Default constructor and destructor without any arguments must be defined.
These will be used by class SOLIDIFICATION_app_Creator. For example:
and
Load arguments from PanPhaseField: user_pfm_solidification::load_arguments;
Run simulation user_pfm_solidification::run_pfm_calculation;
These will be called by PanPhaseField GUI or console mode and must be implemented
(a) Call PanEngine/PanDataNet Through PanPhaseField SDK
(b) Convert physical properties from PanPhaseField SDK output to properites used by model, for example converting atomic mobility (from PanPhaseField SDK) to chemical mobility
User must update a set of methods to implement customized phase-field model
(a) Allocate memory
(b) Set initial condition
(c) Time-integration related functions, for example laplace operation on chemical profile, calculating chemical diffusion rate, and updating chemical profile
void user_pfm_solidification::load_arguments | ( | PF_ARGS * | m_args, |
char * | msg_char | ||
) |
PanPhaseField SDK is also created inside this method
load_arguments(PF_ARGS* args, char* msg) Load arguments from PanPhaseField (APP interface)
[in] | m_args | the argument from PanPhaseField |
[out] | msg_char | the message from this method |
The default mode is 1 by built - in G, mu, f, x. 2: Cp, Latent heat and phase slope 4 : ThF - thermodynamic factors
void user_pfm_solidification::run_pfm_calculation | ( | char * | msg | ) |
bool user_pfm_solidification::sdk_update_prop | ( | string & | msg, |
int | ip | ||
) |
Update thermodynamic/kinetic properties of the entire system
[out] | msg | the message returned by this method |
[in] | ip | the index of phase to be updated |
bool user_pfm_solidification::model_update_PFDB_parameters | ( | ) |
This method updates the dynamic parameters of the plugin which can evolve with time.
|
inline |
Convert atomic mobility to chemical mobility
[out] | chemical_mobility | the chemical mobility array whose size is the number of component |
[in] | atomic_mobility | the atomic mobility array whose size is the number of component |
[in] | composition | the composition array whose size is the number of component |
void user_pfm_solidification::model_allocate_memory | ( | ) |
bool user_pfm_solidification::model_initial_condition | ( | string | input_path, |
string | irun = "circle" |
||
) |
Initialize composition and order parameters
input_put | the path of input vtk file |
irun | the mode of initialization |
void user_pfm_solidification::update_phase_equilibrium | ( | ) |
skip this function
set this to be true for print properties
get atomic weight
get liquidus surface
get value using PanEngine
get value using PanDataNet
double user_pfm_solidification::model_get_driving_force | ( | ) |
void user_pfm_solidification::model_update_laplace_operation | ( | VectorMesh< double > & | field, |
VectorMesh< double > & | lap_field, | ||
int | index | ||
) |
Apply the laplace operator on index-th dimension of a field and its laplace operation
[in] | field | the mesh of field to be calculated |
[out] | lap_field | the mesh of laplace operation on the field |
[in] | index | the index of field whose laplace operation will be calculated |
void user_pfm_solidification::model_update_rate | ( | int | index | ) |
bool user_pfm_solidification::model_update_field | ( | double | dt | ) |
Update composition of the entire system
[in] | dt | the normalized time step size whose real value is dt*tao |