00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef PDH_HEAT_BC_H
00023 #define PDH_HEAT_BC_H
00024
00025 #include <stdio.h>
00026 #include "uth_mesh.h"
00027 #include "uth_mat.h"
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040
00041 typedef enum {
00042 BC_HEAT_NONE,
00043 BC_HEAT_SYMMETRY,
00044 BC_HEAT_OUTFLOW,
00045 BC_HEAT_ISOTHERMAL,
00046 BC_HEAT_NORMAL_HEAT_FLUX,
00047 BC_HEAT_GOLDAK_HEAT_SOURCE,
00048 BC_HEAT_RADCONV,
00049 BC_HEAT_CONV,
00050 BC_HEAT_CONTACT
00051 } pdt_heat_bctype;
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 typedef struct {
00063 int bnum;
00064 double Q;
00065 double v[3];
00066
00067 double ff;
00068 double fr;
00069 double a;
00070 double b;
00071 double c1;
00072 double c2;
00073 double init_pos[3];
00074 double current_pos[3];
00075
00076 double h;
00077 double eps;
00078 double versor[3];
00079 } pdt_heat_bc_goldak_source;
00080
00081 typedef struct {
00082 int bnum;
00083 double *alfaFor;
00084 double *alfaTemp;
00085 int setting_length;
00086 double t_inf;
00087 double eps;
00088 double alfa;
00089 } pdt_heat_bc_radconv;
00090
00091 typedef struct {
00092 int bnum;
00093 double temp;
00094 } pdt_heat_bc_isothermal;
00095
00096 typedef struct {
00097 int bnum;
00098 double flux;
00099 } pdt_heat_bc_normal_flux;
00100
00101 typedef struct {
00102 int bnum;
00103
00104 } pdt_heat_bc_outflow;
00105
00106 typedef struct {
00107 int bnum;
00108 double *alfaFor;
00109 double *alfaTemp;
00110 double alfa;
00111 int setting_length;
00112 } pdt_heat_bc_contact;
00113
00114
00115
00116 typedef struct {
00117 int bnum;
00118 pdt_heat_bctype bc_heat;
00119 int bc_heat_data_idx;
00120 } pdt_heat_bc_assignments;
00121
00122
00123 typedef struct {
00124 pdt_heat_bc_assignments *bc_assignments;
00125 int bc_assignments_count;
00126
00127 pdt_heat_bc_isothermal *bc_isothermal;
00128 int bc_isothermal_count;
00129
00130 pdt_heat_bc_normal_flux *bc_normal_heat_flux;
00131 int bc_normal_heat_flux_count;
00132
00133 pdt_heat_bc_goldak_source *bc_goldak;
00134 int bc_goldak_count;
00135
00136 pdt_heat_bc_radconv *bc_radconv;
00137 int bc_radconv_count;
00138
00139 pdt_heat_bc_outflow *bc_outflow;
00140 int bc_outflow_count;
00141
00142 pdt_heat_bc_contact *bc_contact;
00143 int bc_contact_count;
00144
00145 } pdt_heat_bc;
00146
00147
00148
00149
00150
00151
00152
00153
00154
00158 int pdr_heat_bc_read(
00159 char *Work_dir,
00160 char *Filename,
00161 FILE *Interactive_output,
00162 pdt_heat_bc *Bc_db);
00163
00167 int pdr_heat_bc_free(pdt_heat_bc *Bc_db);
00168
00172 double pdr_heat_contact_get_alfa_in_the_temp(const pdt_heat_bc_contact *bc,
00173 const double temp);
00174 double pdr_heat_radconv_get_alfa_in_the_temp(const pdt_heat_bc_radconv *bc,
00175 const double temp);
00176
00177
00181 int pdr_heat_get_bc_assign_count(const pdt_heat_bc * Bc_db);
00182
00183
00187 pdt_heat_bctype pdr_heat_get_bc_type(
00188 const pdt_heat_bc *Bc_db,
00189 int Bnum
00190 );
00191
00192
00196 void* pdr_heat_get_bc_data(
00197 const pdt_heat_bc *Bc_db,
00198 int Bnum
00199 );
00200
00204 int pdr_heat_update_timedep_bc(
00205 const pdt_heat_bc *Bc_db,
00206 double Time
00207 );
00208
00212 double pdr_heat_bc_get_goldak_hf_at_point(
00213 double X,
00214 double Y,
00215 double Z,
00216 const pdt_heat_bc_goldak_source *Bc_goldak,
00217
00218 const double *Vec_norm
00219 );
00220
00221
00222 #ifdef __cplusplus
00223 }
00224 #endif
00225
00226 #endif