00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef PDH_NS_SUPG_BC_H
00027 #define PDH_NS_SUPG_BC_H
00028
00029 #include <stdio.h>
00030
00031 #include "uth_mesh.h"
00032
00033 #ifdef __cplusplus
00034 extern "C"
00035 {
00036 #endif
00037
00038
00039
00040
00041
00042
00043
00044
00045 typedef enum {
00046 BC_NS_SUPG_NONE,
00047 BC_NS_SUPG_INFLOW_RECT,
00048 BC_NS_SUPG_INFLOW_LINEAR2D,
00049 BC_NS_SUPG_INFLOW_CIRCLE3D,
00050 BC_NS_SUPG_OUTFLOW,
00051 BC_NS_SUPG_NOSLIP,
00052 BC_NS_SUPG_FREE_SLIP,
00053 BC_NS_SUPG_SYMMETRY,
00054 BC_NS_SUPG_VELOCITY,
00055 BC_NS_SUPG_MARANGONI,
00056 BC_NS_SUPG_CONTACT
00057 } pdt_ns_supg_bctype;
00058
00059 typedef enum {
00060 BC_NS_SUPG_VEL_ORIENT_GLOB=0,
00061 BC_NS_SUPG_VEL_ORIENT_LOC=1
00062 } pdt_ns_supg_bc_vel_orient;
00063
00064
00065
00066
00067
00068
00069
00070
00071 typedef struct {
00072 int bnum;
00073 double n1[3];
00074 double n2[3];
00075 double n3[3];
00076 double n4[3];
00077 double v;
00078 int dimensions;
00079 } pdt_ns_supg_bc_inflow_rect;
00080
00081 typedef struct {
00082 int bnum;
00083 double n1[3];
00084 double n2[3];
00085 double v;
00086 } pdt_ns_supg_bc_inflow_linear_2d;
00087
00088 typedef struct {
00089 int bnum;
00090 double center[3];
00091 double radius;
00092 double v;
00093 } pdt_ns_supg_bc_inflow_circle_3d;
00094
00095
00096
00097
00098 typedef struct {
00099 int bnum;
00100 double pressure;
00101 } pdt_ns_supg_bc_outflow;
00102
00103 typedef struct {
00104 int bnum;
00105 double v[3];
00106 int vel_orient;
00107 } pdt_ns_supg_bc_velocity;
00108
00109 typedef struct {
00110 double p;
00111 double pin_node_coor[3];
00112 } pdt_ns_supg_pin_pressure;
00113
00114 typedef struct {
00115 double v[3];
00116 double pin_node_coor[3];
00117 } pdt_ns_supg_pin_velocity;
00118
00119 typedef struct {
00120 int bnum;
00121 double n[3];
00122 double node_coor[3];
00123 } pdt_ns_supg_bc_marangoni;
00124
00125 typedef struct {
00126 int bnum;
00127 int setting_length;
00128 int IDs[2];
00129 pdt_ns_supg_bctype bc_subtype;
00130 utt_mesh_bc_type type;
00131 } pdt_ns_supg_bc_contact;
00132
00133
00134
00135
00136 typedef struct {
00137 int bnum;
00138 pdt_ns_supg_bctype bc_ns_supg;
00139 int bc_ns_supg_data_idx;
00140 } pdt_ns_supg_bc_assignments;
00141
00142
00143 typedef struct {
00144 pdt_ns_supg_bc_assignments *bc_assignments;
00145 int bc_assignments_count;
00146
00147 pdt_ns_supg_bc_inflow_circle_3d *bc_inflow_circle_3d;
00148 int bc_inflow_circle_3d_count;
00149
00150 pdt_ns_supg_bc_inflow_rect *bc_inflow_rect;
00151 int bc_inflow_rect_count;
00152
00153 pdt_ns_supg_bc_inflow_linear_2d *bc_inflow_linear_2d;
00154 int bc_inflow_linear_2d_count;
00155
00156 pdt_ns_supg_bc_outflow *bc_outflow;
00157 int bc_outflow_count;
00158
00159 pdt_ns_supg_bc_velocity *bc_velocity;
00160 int bc_velocity_count;
00161
00162 pdt_ns_supg_bc_marangoni *bc_marangoni;
00163 int bc_marangoni_count;
00164
00165 pdt_ns_supg_pin_pressure *pin_pressure;
00166 int pin_pressure_count;
00167
00168 pdt_ns_supg_pin_velocity *pin_velocity;
00169 int pin_velocity_count;
00170
00171 pdt_ns_supg_bc_contact *bc_contact;
00172 int bc_contact_count;
00173
00174
00175 } pdt_ns_supg_bc;
00176
00177
00178
00179
00180
00181
00182
00183
00184
00188 int pdr_ns_supg_bc_read(
00189 char *Work_dir,
00190 char *Filename,
00191 FILE *Interactive_output,
00192 pdt_ns_supg_bc *Bc_db);
00193
00197 int pdr_ns_supg_bc_free(pdt_ns_supg_bc *Bc_db);
00198
00202 int pdr_ns_supg_get_pressure_pins_count(const pdt_ns_supg_bc *Bc_db);
00203
00204
00208 int pdr_ns_supg_get_velocity_pins_count(const pdt_ns_supg_bc *Bc_db);
00209
00210
00214 int pdr_ns_supg_get_bc_assign_count(const pdt_ns_supg_bc *Bc_db);
00215
00216
00220 pdt_ns_supg_pin_pressure* pdr_ns_supg_get_pressure_pin(
00221 const pdt_ns_supg_bc *Bc_db,
00222 int Idx
00223 );
00224
00228 pdt_ns_supg_pin_velocity* pdr_ns_supg_get_velocity_pin(
00229 const pdt_ns_supg_bc *Bc_db,
00230 int Idx
00231 );
00232
00236 pdt_ns_supg_bctype pdr_ns_supg_get_bc_type(
00237 const pdt_ns_supg_bc *Bc_db,
00238 int Bnum
00239 );
00240
00241
00245 void* pdr_ns_supg_get_bc_data(
00246 const pdt_ns_supg_bc *Bc_db,
00247 int Bnum
00248 );
00249
00250
00254 int pdr_ns_supg_update_timedep_bc(
00255 const pdt_ns_supg_bc *Bc_db,
00256 double Time
00257 );
00258
00259
00260 #ifdef __cplusplus
00261 }
00262 #endif
00263
00264 #endif