PanPhaseField SDK
pfm_sdk.h File Reference

PanDataNet/PanEngine API of PanPhaseField SDK. More...

#include "Pan_Global.h"
#include "ppf_APP_interface.h"
#include "Pan_Global_Def.h"

Classes

struct  PFM_SDK_Input_Condition
 Structure to store the input condition of PanDataNet API. More...
 
struct  PFM_SDK_Output_Data
 Structure to store the output properties of PanDataNet API. More...
 
struct  PFM_SDK_Protocal
 This structure is used to extract the order of elements/phases defined within PanDataNet. More...
 
struct  PFM_SDK_Variables
 This structure stores the SDK variables defined in PanPhaseField. More...
 
class  PFM_SDK
 PanDataNet/PanEngine API for Phase Field Model. More...
 

Macros

#define PFM_SDK_API   __declspec(dllimport)
 
#define SDK_ARRAY_SIZE   16
 
#define SDK_PROTOCOL_SIZE   32
 
#define EXTEND_PFM_SDK_OUTPUT
 

Functions

PFM_SDK_API void Set_PFM_SDK_Mode (PF_ARGS *m_args, int mode)
 [optional function] A C wrapper set mode of PFM SDK output. 1: G, mu, f, x - Default mode. 2: Cp, Latent heat and phase slope 4: ThF-thermodynamic factors A mixture of default and 2nd modes is activated by setting the value to be 1+2=3. [Important] To override default mode, call this function before "Define_PFM_SDK". More...
 
PFM_SDK_API PFM_SDKDefine_PFM_SDK (PF_ARGS *m_args, bool is_parallel_tangent, char *msg)
 A C wrapper returns SDK object pointer. More...
 
PFM_SDK_API void Delete_PFM_SDK (PFM_SDK *pdn_api_ptr)
 A C wrapper deleted created SDK object. More...
 
PFM_SDK_API int Get_PFDB_parameter_exp (char *expression, const char *tabletype, const char *parameter)
 To extract the mathematical expression of the PFDB parameter defined within the matrix phase. More...
 
PFM_SDK_API int Get_PFDB_phase_parameter_exp (char *expression, const char *phasename, const char *tabletype, const char *parameter)
 To extract the mathematical expression of the PFDB parameter defined within a precipitate phase. More...
 
PFM_SDK_API void create_plot_timemoments (double **plot_timemoments, int *Nfiles, PF_ARGS *m_args)
 To create a array of times at which the VTK files will be printed. More...
 
PFM_SDK_API void create_VTK_file_series (const char *calc_name, const char *VTKfilepath, double *plot_timemoments, int Nf)
 To create *.vtk.series files which can be used to load the VTK files into paraview. This file associates each VTK file with a specific time moments. For details look at here. Note that this API is called within create_plot_timemoments(). Hence, you wont need to call this API in your plugin, if you use create_plot_timemoments(). More...
 
PFM_SDK_Input_Condition New_PFM_SDK_Input_Condition ()
 GET an API input structure. More...
 
PFM_SDK_Output_Data New_PFM_SDK_Output_Data ()
 GET an API output structure. More...
 

Detailed Description

PanDataNet/PanEngine API of PanPhaseField SDK.

Author
CompuTherm, LLC https://www.computherm.com
Version
2023

Macro Definition Documentation

◆ SDK_ARRAY_SIZE

#define SDK_ARRAY_SIZE   16

Size of array used by SDK input/output data structure

◆ SDK_PROTOCOL_SIZE

#define SDK_PROTOCOL_SIZE   32

Size of array used by SDK protocol data structure

Function Documentation

◆ Set_PFM_SDK_Mode()

PFM_SDK_API void Set_PFM_SDK_Mode ( PF_ARGS m_args,
int  mode 
)

[optional function] A C wrapper set mode of PFM SDK output. 1: G, mu, f, x - Default mode. 2: Cp, Latent heat and phase slope 4: ThF-thermodynamic factors A mixture of default and 2nd modes is activated by setting the value to be 1+2=3. [Important] To override default mode, call this function before "Define_PFM_SDK".

Parameters
[in]m_argsthe arguments from PanPhaseField
[in]modeof PFM SDK output

◆ Define_PFM_SDK()

PFM_SDK_API PFM_SDK * Define_PFM_SDK ( PF_ARGS m_args,
bool  is_parallel_tangent,
char *  msg 
)

A C wrapper returns SDK object pointer.

Parameters
[in]m_argsthe arguments from PanPhaseField
[in]is_parallel_tangentthe selector between parallel and common tangent equilibriums
[out]msgthe message returned by this function
Returns
a SDK object pointer

◆ Delete_PFM_SDK()

PFM_SDK_API void Delete_PFM_SDK ( PFM_SDK pdn_api_ptr)

A C wrapper deleted created SDK object.

Parameters
[in]pdn_api_ptrthe pointer to the SDK object
Returns
void

◆ Get_PFDB_parameter_exp()

PFM_SDK_API int Get_PFDB_parameter_exp ( char *  expression,
const char *  tabletype,
const char *  parameter 
)

To extract the mathematical expression of the PFDB parameter defined within the matrix phase.

Parameters
[out]expressionMathematical expression of the parameter
[in]tabletypeThe type of the parameter table.
[in]parameterThe name/type of the parameter.
Returns
Return the string length of the mathematical expression. If the parameter is not found, it return 0.

◆ Get_PFDB_phase_parameter_exp()

PFM_SDK_API int Get_PFDB_phase_parameter_exp ( char *  expression,
const char *  phasename,
const char *  tabletype,
const char *  parameter 
)

To extract the mathematical expression of the PFDB parameter defined within a precipitate phase.

Parameters
[out]expressionMathematical expression of the parameter
[in]phasenameThe name of the phase in which the parameter is defined.
[in]tabletypeThe type of the parameter table.
[in]parameterThe name/type of the parameter.
Returns
Return the string length of the mathematical expression. If the parameter is not found, it return 0.

◆ create_plot_timemoments()

PFM_SDK_API void create_plot_timemoments ( double **  plot_timemoments,
int *  Nfiles,
PF_ARGS m_args 
)

To create a array of times at which the VTK files will be printed.

Parameters
[out]plot_timemomentsTime moments that needs to be printed.
[out]NfilesNumber of files to be printed.
[in]m_argsThe arguments from PanPhaseField
Note
plot_timemoments is dynamically allocated within the API. free(*) should be called outside the API to free the memory. plot_timemoments will not include the time t=0 and will include the end time of the simulation.

◆ create_VTK_file_series()

PFM_SDK_API void create_VTK_file_series ( const char *  calc_name,
const char *  VTKfilepath,
double *  plot_timemoments,
int  Nf 
)

To create *.vtk.series files which can be used to load the VTK files into paraview. This file associates each VTK file with a specific time moments. For details look at here. Note that this API is called within create_plot_timemoments(). Hence, you wont need to call this API in your plugin, if you use create_plot_timemoments().

See also
create_plot_timemoments(double** plot_timemoments, int* Nfiles, PF_ARGS * m_args)
Parameters
[in]calc_nameThe name of the calculation.
[in]VTKfilepathThe location where *.vtk files are stored.
[in]plot_timemomentsThe timemoments which will be printed.
[in]NfNumber of time moments in plot_timemoments.

◆ New_PFM_SDK_Input_Condition()

PFM_SDK_Input_Condition New_PFM_SDK_Input_Condition ( )
inline

GET an API input structure.

Returns
a new input condition data structure

◆ New_PFM_SDK_Output_Data()

PFM_SDK_Output_Data New_PFM_SDK_Output_Data ( )
inline

GET an API output structure.

Returns
a new output property data structure