00001
00010 #ifndef PY_CALC_MODEL_H
00011 #define PY_CALC_MODEL_H
00012
00013 #include BS_FORCE_PLUGIN_IMPORT ()
00014 #include "py_pvt.h"
00015 #include BS_STOP_PLUGIN_IMPORT ()
00016
00017 namespace blue_sky
00018 {
00019
00020 template <typename strategy_t>
00021 class calc_model;
00022
00023 template <typename strategy_t>
00024 struct calc_model_data;
00025
00026 namespace python
00027 {
00028
00029 template <typename strategy_t>
00030 struct py_calc_model_data : calc_model_data <strategy_t>
00031 {
00032 typedef py_calc_model_data <strategy_t> this_t;
00033 typedef calc_model_data <strategy_t> base_t;
00034 typedef typename strategy_t::item_t item_t;
00035 typedef typename strategy_t::item_array_t item_array_t;
00036 typedef typename strategy_t::index_t index_t;
00037
00038 py_calc_model_data () : base_t () {}
00039 py_calc_model_data (const base_t &cm) : base_t (cm) {}
00040
00041 item_array_t get_cap_pressure () const;
00042 item_array_t get_s_deriv_cap_pressure () const;
00043
00044 item_array_t get_relative_perm () const;
00045 item_array_t get_s_deriv_relative_perm () const;
00046
00047
00048 item_t get_p_deriv_gas_oil_ratio () const;
00049
00050 item_array_t get_invers_fvf () const;
00051 item_array_t get_p_deriv_invers_fvf () const;
00052 item_t get_gor_deriv_invers_fvf () const;
00053
00054 item_array_t get_invers_viscosity () const;
00055 item_array_t get_p_deriv_invers_viscosity () const;
00056 item_t get_gor_deriv_invers_viscosity () const;
00057
00058 item_array_t get_invers_visc_fvf () const;
00059 item_array_t get_p_deriv_invers_visc_fvf () const;
00060 item_t get_gor_deriv_invers_visc_fvf () const;
00061
00062 item_array_t get_density () const;
00063 item_array_t get_p_deriv_density () const;
00064 item_t get_gor_deriv_density () const;
00065
00066 item_t get_porosity () const;
00067 item_t get_p_deriv_porosity () const;
00068
00069 item_t get_truns_mult () const;
00070 item_t get_p_deriv_truns_mult () const;
00071
00072 item_array_t get_mobility () const;
00073 item_array_t get_p_deriv_mobility () const;
00074 item_array_t get_s_deriv_mobility () const;
00075
00076 item_array_t get_prev_fluid_volume () const;
00077 };
00078
00079 template <typename strategy_t>
00080 class py_scal_3p;
00081
00082 template <typename strategy_t>
00083 class py_idata;
00084
00085 template<class strategy_t>
00086 class py_calc_model : public py_objbase
00087 {
00088 public:
00089 typedef typename strategy_t::item_array_t item_array_t;
00090 typedef typename strategy_t::item_t item_t;
00091 typedef typename strategy_t::index_array_t index_array_t;
00092 typedef typename strategy_t::index_t index_t;
00093
00094 typedef calc_model<strategy_t> wrapped_t;
00095 typedef smart_ptr<wrapped_t> sp_cm_t;
00096
00097 typedef py_idata <strategy_t> py_idata_t;
00098
00099 typedef py_calc_model_data <strategy_t> py_calc_model_data_t;
00100
00101 typedef typename wrapped_t::sp_fi_params sp_fi_params_t;
00102
00103 public:
00104
00105 py_calc_model ();
00106 py_calc_model(const sp_cm_t &);
00107 ~py_calc_model () {}
00108
00109 py_pvt_water <pvt_water <strategy_t> >
00110 get_pvt_water (index_t n_pvt_region) const;
00111
00112 py_pvt_gas <pvt_gas <strategy_t> >
00113 get_pvt_gas (index_t n_pvt_region) const;
00114
00115 py_pvt_oil <pvt_oil <strategy_t> >
00116 get_pvt_oil (index_t n_pvt_region) const;
00117
00118
00119 item_array_t get_saturation ();
00120 item_array_t get_pressure();
00121 item_array_t get_gas_oil_ratio();
00122 index_t get_pvt_num();
00123 index_t get_sat_num();
00124 index_t get_fip_num();
00125
00126 item_array_t get_plane_flow_rate ();
00127 item_array_t get_full_step_plane_flow_rate ();
00128
00129 index_array_t get_pvt_regions ();
00130 index_array_t get_sat_regions ();
00131 index_array_t get_fip_regions ();
00132 index_array_t get_rock_regions ();
00133
00134 index_array_t get_bconn_mainvar ();
00135
00136 item_array_t get_bconn_pressure ();
00137 item_array_t get_bconn_saturation ();
00138 item_array_t get_bconn_gor ();
00139
00140 py_scal_3p<strategy_t>
00141 get_scal () const;
00142
00143 py_calc_model_data_t get_data (index_t) const;
00144
00145 index_t cmd_num () const;
00146 index_t all_data_len () const;
00147
00148 index_t cap_pressure_len () const;
00149 item_t get_cap_pressure (index_t, index_t) const;
00150
00151 index_t s_deriv_cap_pressure_len () const;
00152 item_t get_s_deriv_cap_pressure (index_t, index_t) const;
00153
00154 index_t relative_perm_len () const;
00155 item_t get_relative_perm (index_t, index_t) const;
00156
00157 index_t s_deriv_relative_perm_len () const;
00158 item_t get_s_deriv_relative_perm (index_t, index_t) const;
00159
00160 index_t p_deriv_gas_oil_ratio_len () const;
00161 item_t get_p_deriv_gas_oil_ratio (index_t, index_t) const;
00162
00163 index_t invers_fvf_len () const;
00164 item_t get_invers_fvf (index_t, index_t) const;
00165
00166 index_t p_deriv_invers_fvf_len () const;
00167 item_t get_p_deriv_invers_fvf (index_t, index_t) const;
00168
00169 index_t gor_deriv_invers_fvf_len () const;
00170 item_t get_gor_deriv_invers_fvf (index_t, index_t) const;
00171
00172 index_t invers_viscosity_len () const;
00173 item_t get_invers_viscosity (index_t, index_t) const;
00174
00175 index_t p_deriv_invers_viscosity_len () const;
00176 item_t get_p_deriv_invers_viscosity (index_t, index_t) const;
00177
00178 index_t gor_deriv_invers_viscosity_len () const;
00179 item_t get_gor_deriv_invers_viscosity (index_t, index_t) const;
00180
00181 index_t invers_visc_fvf_len () const;
00182 item_t get_invers_visc_fvf (index_t, index_t) const;
00183
00184 index_t p_deriv_invers_visc_fvf_len () const;
00185 item_t get_p_deriv_invers_visc_fvf (index_t, index_t) const;
00186
00187 index_t gor_deriv_invers_visc_fvf_len () const;
00188 item_t get_gor_deriv_invers_visc_fvf (index_t, index_t) const;
00189
00190 index_t density_len () const;
00191 item_t get_density (index_t, index_t) const;
00192
00193 index_t p_deriv_density_len () const;
00194 item_t get_p_deriv_density (index_t, index_t) const;
00195
00196 index_t gor_deriv_density_len () const;
00197 item_t get_gor_deriv_density (index_t, index_t) const;
00198
00199 index_t porosity_len () const;
00200 item_t get_porosity (index_t, index_t) const;
00201
00202 index_t p_deriv_porosity_len () const;
00203 item_t get_p_deriv_porosity (index_t, index_t) const;
00204
00205 index_t truns_mult_len () const;
00206 item_t get_truns_mult (index_t, index_t) const;
00207
00208 index_t p_deriv_truns_mult_len () const;
00209 item_t get_p_deriv_truns_mult (index_t, index_t) const;
00210
00211 index_t mobility_len () const;
00212 item_t get_mobility (index_t, index_t) const;
00213
00214 index_t p_deriv_mobility_len () const;
00215 item_t get_p_deriv_mobility (index_t, index_t) const;
00216
00217 index_t s_deriv_mobility_len () const;
00218 item_t get_s_deriv_mobility (index_t, index_t) const;
00219
00220 index_t prev_fluid_volume_len () const;
00221 item_t get_prev_fluid_volume (index_t, index_t) const;
00222
00223 void initialize_datas ();
00224
00225 int get_n_phases () const;
00226 bool is_water () const;
00227 bool is_gas () const;
00228 bool is_oil () const;
00229
00230 sp_fi_params_t get_fi_params () const;
00231
00232 private:
00233 };
00234
00238 void
00239 py_export_calc_model ();
00240 }
00241 }
00242
00243 #endif // PY_CALC_MODEL_H