00001 /************************************************************************ 00002 File pdh_ns_mixed_materials.h - types and functions related to materials 00003 handling - for HMT problem 00004 00005 Contains declarations of routines: 00006 pdr_ns_mixed_material_read - reads materials file and fills structures 00007 pdr_ns_mixed_material_query - gets material data 00008 pdr_ns_mixed_material_free - free materials structures 00009 00010 ------------------------------ 00011 History: 00012 2011 - Przemyslaw Plaszewski (pplaszew@agh.edu.pl) 00013 2011 - Aleksander Siwek (Aleksander.Siwek@agh.edu.pl) 00014 2012 - Krzysztof Banas (pobanas@cyf-kr.edu.pl) 00015 00016 *************************************************************************/ 00017 00018 #ifndef PDH_NS_MIXED_MATERIALS 00019 #define PDH_NS_MIXED_MATERIALS 00020 00021 #include <stdio.h> 00022 00023 #include "uth_mat.h" 00024 00025 #ifdef __cplusplus 00026 extern "C" 00027 { 00028 #endif 00029 00030 00036 00038 //typedef struct { 00039 // int matnum; 00040 // char name[20]; 00041 00042 // double *Tfor_dynamic_viscosity; 00043 // double *atT_dynamic_viscosity; 00044 // int dynamic_viscosity_num; 00045 00046 // double *Tfor_density; 00047 // double *atT_density; 00048 // int density_num; 00049 00050 // //double *Tfor_thermal_conductivity; 00051 // //double *atT_thermal_conductivity; 00052 // //int thermal_conductivity_num; 00053 00054 // //double *Tfor_specific_heat; 00055 // //double *atT_specific_heat; 00056 // //int specific_heat_num; 00057 00058 // //double *Tfor_enthalpy; 00059 // //double *atT_enthalpy; 00060 // //int enthalpy_num; 00061 00062 // //double *Tfor_thermal_expansion_coefficient; 00063 // //double *atT_thermal_expansion_coefficient; 00064 // //int thermal_expansion_coefficient_num; 00065 00066 // //double *Tfor_electrical_resistivity; 00067 // //double *atT_electrical_resistivity; 00068 // //int electrical_resistivity_num; 00069 00070 // double *Tfor_VOF; 00071 // double *atT_VOF; 00072 // int VOF_num; 00073 00074 // double *Tfor_dg_dT; 00075 // double *atT_dg_dT; 00076 // int dg_dT_num; 00077 00078 // double temp_solidus; 00079 // double temp_liquidus; 00080 // double temp_vaporization; 00081 00082 // double latent_heat_of_fusion; 00083 // double latent_heat_of_vaporization; 00084 00085 //} pdt_ns_mixed_material_data; 00086 00088 //typedef struct{ 00089 // int materials_num; 00090 // char **material_names; 00091 // pdt_ns_mixed_material_data *material_data; 00092 // //TODO: cache 00093 //} pdt_ns_mixed_materials; 00094 00095 //typedef enum { 00096 // QUERY_NS_MIXED_NODE, 00097 // QUERY_NS_MIXED_POINT 00098 //} pdt_ns_mixed_query_type; 00099 00101 //typedef struct{ 00102 // char * name; //if searching by idx (idx >= 0) set to anything 00103 // int material_idx; //set -1 if you want to search by name 00104 // double temperature; 00105 // double xg[3]; 00106 // pdt_ns_mixed_query_type query_type; 00107 // int cell_id; 00108 // int node_id; 00109 // double aux; 00110 // //in future: elem no., coordinates etc. 00111 //} pdt_ns_mixed_material_query_params; 00112 00114 //typedef struct{ 00115 // char name[20]; 00116 // double dynamic_viscosity; 00117 // double density; 00118 // //double thermal_conductivity; 00119 // //double specific_heat; 00120 // //double enthalpy; 00121 // //double thermal_expansion_coefficient; 00122 // //double electrical_resistivity; 00123 // double VOF; 00124 // double dg_dT; 00125 // double temp_solidus; 00126 // double temp_liquidus; 00127 // double temp_vaporization; 00128 // double latent_heat_of_fusion; 00129 // double latent_heat_of_vaporization; 00130 //} pdt_ns_mixed_material_query_result; 00131 00132 00133 /**************************************/ 00134 /* INTERNAL PROCEDURES */ 00135 /**************************************/ 00136 /* Rules: 00137 /* - name always begins with pdr_ */ 00138 /* - argument names start uppercase */ 00139 00143 int pdr_ns_mixed_material_read( 00144 char *Work_dir, 00145 char *Filename, 00146 FILE *Interactive_output 00147 //pdt_ns_mixed_materials *Materials_db /* out: materials structure to be filled */ 00148 ); 00149 00153 int pdr_ns_mixed_material_query( 00154 //const pdt_ns_mixed_materials *Materials_db, /* in: materials structure */ 00155 const utt_material_query_params *Params, /* in: query parameters */ 00156 utt_material_query_result *Result /* out: material data */ 00157 ); 00158 00162 //int pdr_ns_mixed_material_free(pdt_ns_mixed_materials *Materials_db); 00163 00164 #ifdef __cplusplus 00165 } 00166 #endif 00167 00168 #endif