blue_sky::calc_model< strategy_t > Class Template Reference

holds calculated data and implements some useful functions More...

#include <calc_model.h>

List of all members.

Public Types

typedef strategy_t strategy_type
 strategy_type
typedef calc_model< strategy_t > this_t
 shortname for this type
typedef smart_ptr< this_t, true > sp_this_t
 smart_ptr to this_t type
typedef jacobian< strategy_t > jacobian_t
 jacobian type
typedef smart_ptr< jacobian_t,
true > 
sp_jacobian_t
 smart_ptr to jacobian type
typedef jacobian_matrix
< strategy_t > 
jacobian_matrix_t
 jacobian_matrix type
typedef smart_ptr
< jacobian_matrix_t, true > 
sp_jacobian_matrix_t
 smart_ptr to jacobian_matrix type
typedef idata idata_t
 idata type
typedef smart_ptr< idata_t, true > sp_idata_t
 smart_ptr to idata type
typedef rs_mesh_iface< strategy_t > mesh_iface_t
 rs_mesh_iface type
typedef smart_ptr
< mesh_iface_t, true > 
sp_mesh_iface_t
 smart_ptr to rs_mesh_iface
typedef rs_smesh_iface
< strategy_t > 
smesh_iface_t
 rs_smesh_iface type
typedef smart_ptr
< smesh_iface_t, true > 
sp_smesh_iface_t
 smart_ptr to rs_smesh_iface
typedef reservoir< strategy_t > reservoir_t
 reservoir type
typedef smart_ptr< reservoir_t,
true > 
sp_reservoir_t
 smart_ptr to reservoir type
typedef strategy_t::item_array_t item_array_t
 type for array of item_t values
typedef strategy_t::index_array_t index_array_t
 type for array of index_t values
typedef strategy_t::item_t item_t
 item value (floating point)
typedef strategy_t::index_t index_t
 index value (integral type)
typedef strategy_t::csr_matrix_t csr_matrix_t
 shortname for csr_matrix type
typedef smart_ptr
< csr_matrix_t, true > 
sp_csr_matrix_t
 smart_ptr to csr_matrix type
typedef calc_model_data
< strategy_t > 
data_t
 calc_model data, each instance for one mesh cell
typedef strategy_t::template
vec< data_t >::type 
data_array_t
 array of calc_model_data values, each value for one mesh cell
typedef scal_3p< strategy_t > scal_3p_t
 scal_3p type
typedef scale_array_holder
< strategy_t > 
scale_array_holder_t
 type of holder of scale arrays
typedef wells::connection
< strategy_t > 
connection_t
 base type for well connections
typedef well< strategy_t > well_t
 base type for wells
typedef smart_ptr< scal_3p_t,
true > 
sp_scal3p
 smart_ptr to scal_3p type
typedef smart_ptr
< scale_array_holder_t, true > 
sp_scale_array_holder_t
 smart_ptr to scale_array_holder type
typedef smart_ptr< rock_grid
< strategy_t >, true > 
sp_rock_grid
 smart_ptr to rock_grid type
typedef smart_ptr< fi_params,
true > 
sp_fi_params
 smart_ptr to fi_params type
typedef smart_ptr
< connection_t, true > 
sp_connection_t
 smart_ptr to connection type
typedef smart_ptr< well_t, true > sp_well_t
 smart_ptr to well type
typedef smart_ptr
< well_results_storage, true > 
sp_well_results_storage
 smart_ptr to well_results_storage type
typedef smart_ptr
< fip_results_storage, true > 
sp_fip_results_storage
 smart_ptr to fip_results_storage type
typedef pvt_base< strategy_t > pvt_base_t
 type of base pvt class
typedef pvt_oil< strategy_t > pvt_oil_t
 pvt_oil type
typedef pvt_dead_oil< strategy_t > pvt_dead_oil_t
 pvt_dead_oil type
typedef pvt_gas< strategy_t > pvt_gas_t
 pvt_gas type
typedef pvt_water< strategy_t > pvt_water_t
 pvt_water type
typedef smart_ptr< pvt_base_t,
true > 
sp_pvt_t
 smart_ptr to pvt_base type
typedef smart_ptr
< pvt_dead_oil_t, true > 
sp_pvt_oil
 smart_ptr to pvt_dead_oil type
typedef smart_ptr
< pvt_dead_oil_t, true > 
sp_pvt_dead_oil
 smart_ptr to pvt_dead_oil type
typedef smart_ptr< pvt_gas_t,
true > 
sp_pvt_gas
 smart_ptr to pvt_gas type
typedef smart_ptr< pvt_water_t,
true > 
sp_pvt_water
 smart_ptr to pvt_water type
typedef std::vector< sp_pvt_tsp_pvt_array_t
 type for array of pvt_base objects
typedef std::vector< sp_pvt_oilsp_pvt_oil_array_t
 type for array of pvt_dead_oil objects
typedef std::vector
< sp_pvt_dead_oil
sp_pvt_dead_oil_array_t
 type for array of pvt_dead_oil objects
typedef std::vector< sp_pvt_gassp_pvt_gas_array_t
 type for array of pvt_gas objects
typedef std::vector< sp_pvt_watersp_pvt_water_array_t
 type for array of pvt_water objects
typedef std::vector< int > vec_i
 vector of int values
typedef boost::array< index_t,
FI_PHASE_TOT > 
phase_d_t
 type for array of shifts for each phase
typedef boost::array< index_t,
FI_PHASE_TOT > 
sat_d_t
 type for array of shifts for each phase, for saturation
typedef norms_storage< strategy_t > norms_storage_t
 norms_storage type
typedef boost::array< item_t,
FI_PHASE_TOT > 
invers_fvf_avgerage_t
 type for store invers_fvf_average value (by phase)
typedef strategy_t::template
vec< main_var_type >::type 
main_var_array_t
 type for array of main_var_type values
typedef
calc_model_data_tmp_holder
< strategy_t > 
calc_model_data_tmp_holder_t
 temporary holder for calc_model data

Public Member Functions

 ~calc_model ()
 calc_model dtor
void init ()
 inits calc_model
const this_toperator= (const this_t &src)
 assignment operator
int init_main_arrays (const sp_idata_t &input_data, const sp_mesh_iface_t &mesh)
 inits main arrays
int init_calcul_arrays (const sp_idata_t &input_data, const sp_mesh_iface_t &mesh)
 inits arrays for calculation process
int set_initial_data (const sp_idata_t &input_data, const sp_mesh_iface_t &mesh)
 inits initial conditions
int calc_equil (const sp_idata_t &input_data, const sp_mesh_iface_t &mesh)
 calculates equilibrium
int equil_calc_pressure (item_t prev_press, item_t cur_d, item_t h, index_t phase, index_t i_pvt, double rs_type, item_t depth_goc, item_t rs_dat, val_vs_depth *rsvd, val_vs_depth *pbvd, item_t &p, item_t *rs=0)
 calculates pressure for equil
int init_pressure (const sp_idata_t &input_data, const sp_mesh_iface_t &mesh)
 inits pressure array
int init_saturation (const sp_idata_t &input_data, const sp_mesh_iface_t &mesh)
 inits saturation array
int init_rs (const sp_idata_t &input_data, const sp_mesh_iface_t &mesh)
 inits phases variables (rs) and selest number of phases
void init_scal ()
 inits scal
void init_pvt_arrays (sp_pvt_oil_array_t &pvto_, sp_pvt_gas_array_t &pvtg_, sp_pvt_water_array_t &pvtw_, const sp_idata_t &idata_)
 inits pvt arrays
const data_tget_data (index_t n_block) const
 return calc_model_data for n_block cell
item_t get_initial_rho (item_t height) const
void update_min_pressure_range (item_t min_range)
void update_max_pressure_range (item_t max_range)
void calc_prev_fluid_volume (bool istart, const sp_mesh_iface_t &mesh)
 calculates fluid volume for previous step
restore_solution_return_type restore_solution (const sp_mesh_iface_t &mesh, const sp_jacobian_matrix_t &jacobian_mx)
 restores solution from jacobian_matrix
restore_solution_return_type apply_newton_correction (item_t mult, index_t istart_line_search, const sp_mesh_iface_t &mesh, const sp_jacobian_matrix_t &jacobian_mx)
 applies newton correction and multiplies it by given mult (default 1.0)
item_t new_simple_get_cell_solution_mult (const sp_mesh_iface_t &mesh, const sp_jacobian_matrix_t &jacobian_mx)
 calculates multiplier (m) for newton correction vector (J(x0) * w = -F(x0), x1 = x0 + m * w)
item_t new_simple_get_cell_solution_mult_2 (const sp_mesh_iface_t &mesh, const sp_jacobian_matrix_t &jmatrix) const
 returns multiplier for apply_newton_correction function
int new_simple_get_cell_solution (const double mult, int istart_linear_search, const sp_mesh_iface_t &msh, const sp_jacobian_matrix_t &jacobian_mx)
 restores solution from Jacobian (jacobian_matrix), using mult if istart_linear_search != 0
int calc_approx_so_sg_ro (const item_t mo_in, const item_t mg_in, const item_t poro, const item_t ifvf_o, const item_t ifvf_g, const item_t max_ro, item_t &so, item_t &sg, item_t &ro, main_var_type &m_var)
 calculates approximal value of So, Sg, Ro from full mass of gas (mg_in) and oil (mo_in)
void init_jacobian (const sp_jacobian_t &input_data, const sp_mesh_iface_t &mesh)
 inits jacobian
bool is_water () const
 returns true if water phase present in model
bool is_gas () const
 returns true if gas phase present in model
bool is_oil () const
 returns true if oil phase present in model
index_t water_shift () const
 returns shift value for water phase
index_t gas_shift () const
 returns shift value for gas phase
index_t oil_shift () const
 returns shift value for oil phase
 BLUE_SKY_TYPE_DECL_T (calc_model)
 blue-sky type declaration

Static Public Member Functions

static bool is_water_phase (int phases)
 returns true if water phase present in model
static bool is_gas_phase (int phases)
 returns true if gas phase present in model
static bool is_oil_phase (int phases)
 returns true if oil phase present in model

Public Attributes

main_var_array_t main_variable
 (n_elements) main variables (Sg or Ro) per each grid block
auto_value
< well_model_var_type,
WELL_MODEL_3VAR > 
well_model_var_
 well model var type
auto_value< well_model_type,
BLACK_OIL > 
well_model_type_
 well model type
norms_storage_t norm
 norm storage
sp_pvt_dead_oil_array_t pvt_oil_array
 array of pvt_oil objects, length == n_pvt_regions
sp_pvt_water_array_t pvt_water_array
 array of pvt_water objects, length == n_pvt_regions
sp_pvt_gas_array_t pvt_gas_array
 array of pvt_gas objects, length == n_pvt_regions
data_array_t data
 array of calc_model_data, length == n_elements
item_array_t workspace
 obsolete, n_elements * (n_phase)
calc_model_data_tmp_holder_t old_data_
 calc_model data stored on previous step
calc_model_data_tmp_holder_t prev_niter_data_
 calc_model data stored on previous newton iteration
item_array_t bconn_pressure
 pressure on the boundary
item_array_t bconn_saturation
 obsolete
item_array_t bconn_gor
 obsolete
index_array_t bconn_mainvar
 obsolete
auto_value< item_tlinear_search_mult
auto_value< bool > lsearch_force_newton_step
 obsolete, force to make newton step in any case
auto_value< int > b_w_w
 obsolete
auto_value< int > b_w_g
 obsolete
auto_value< int > b_w_p
 obsolete
auto_value< int > b_g_w
 obsolete
auto_value< int > b_g_g
 obsolete
auto_value< int > b_g_p
 obsolete
auto_value< int > b_o_w
 obsolete
auto_value< int > b_o_g
 obsolete
auto_value< int > b_o_p
 obsolete
index_array_t iwksp
 obsolete, n_elements
auto_value< int > multi_well_in_cell_flag
 obsolete, if != 0 use sorting
auto_value< double > ave_volume
 average volume
index_array_t max_norm_counter
 obsolete
auto_value< int > n_comps
 base parameters
auto_value< int > n_phases
 number of phases
auto_value< int > n_sec_vars
 number if secondary variables
auto_value< FI_PHASE_ENUM > phases
 sizeof (int) bit fields (1 -- phase present, 0 -- do not present)
auto_value< int > n_HCcomps
 number of hydrocarbon components (n_comps = n_HCcomps + 1)
auto_value< int > n_HCphases
 number of hydrocarbon phases (n_phases = n_HCphases + 1)
auto_value< int > n_pri
 number of primary variables
auto_value< int > n_sec
 number of secondary variables
auto_value< int > n_vars
 full number of variables
phase_d_t phase_d
 displacement of phase in arrays
sat_d_t sat_d
 displacement of phase in saturation array
auto_value< int > n_pvt_regions
 number of pvt regions
auto_value< int > n_sat_regions
 number of sat regions
auto_value< int > n_fip_regions
 number of fip regions
physical_constants internal_constants
 physical constants in internal units
index_array_t pvt_regions
 (n_elements) index of PVT table for given block zero base
index_array_t sat_regions
 (n_elements) index of SAT table for given block zero base
index_array_t fip_regions
 (n_elements) index of FIP region for cell
index_array_t rock_regions
 (n_elements) index of ROCK regions
auto_value< RPO_MODEL_ENUM,
RPO_DEFAULT_MODEL > 
rpo_model
 3-ph oil relative permeability model: flag 0, 1 or 2 (stone model)
sp_scal3p scal_prop
 scal properties
sp_rock_grid rock_grid_prop
 rock and grid properties
std::vector< rocktab_table
< base_strategy_fi > > 
rocktab
 (rocktab table)
auto_value< double > last_c_norm
 obsolete
auto_value< int > approx_flag
 flag of initial approximation
sp_fi_params ts_params
 input model params
invers_fvf_avgerage_t invers_fvf_average
 (n_phases) 1. / (formation volume factor) for all phases average
item_array_t plane_flow_rate
 (n_planes * n_phases) flow rates for all planes on current time step
item_array_t full_step_plane_flow_rate
 (n_planes * n_phases) total flow rates on time step
item_array_t pressure
 pressure (n_elements)
item_array_t saturation_3p
 (n_phases * n_elements)
item_array_t gas_oil_ratio
 gas_oil_ratio (n_elements)
sp_csr_matrix_t mat
 obsolete
sp_well_results_storage well_res
 storage for well results
sp_fip_results_storage fip_res
 storage for fip results

Private Member Functions

void init_boundary_connections (const sp_idata_t &input_data, const sp_mesh_iface_t &mesh)


Detailed Description

template<class strategy_t>
class blue_sky::calc_model< strategy_t >

holds calculated data and implements some useful functions

Member Typedef Documentation

template<class strategy_t >
typedef calc_model_data_tmp_holder<strategy_t> blue_sky::calc_model< strategy_t >::calc_model_data_tmp_holder_t

temporary holder for calc_model data

template<class strategy_t >
typedef wells::connection<strategy_t> blue_sky::calc_model< strategy_t >::connection_t

base type for well connections

template<class strategy_t >
typedef strategy_t::csr_matrix_t blue_sky::calc_model< strategy_t >::csr_matrix_t

shortname for csr_matrix type

template<class strategy_t >
typedef strategy_t::template vec<data_t>::type blue_sky::calc_model< strategy_t >::data_array_t

array of calc_model_data values, each value for one mesh cell

template<class strategy_t >
typedef calc_model_data<strategy_t> blue_sky::calc_model< strategy_t >::data_t

calc_model data, each instance for one mesh cell

template<class strategy_t >
typedef idata blue_sky::calc_model< strategy_t >::idata_t

idata type

template<class strategy_t >
typedef strategy_t::index_array_t blue_sky::calc_model< strategy_t >::index_array_t

type for array of index_t values

template<class strategy_t >
typedef strategy_t::index_t blue_sky::calc_model< strategy_t >::index_t

index value (integral type)

template<class strategy_t >
typedef boost::array<item_t, FI_PHASE_TOT> blue_sky::calc_model< strategy_t >::invers_fvf_avgerage_t

type for store invers_fvf_average value (by phase)

template<class strategy_t >
typedef strategy_t::item_array_t blue_sky::calc_model< strategy_t >::item_array_t

type for array of item_t values

template<class strategy_t >
typedef strategy_t::item_t blue_sky::calc_model< strategy_t >::item_t

item value (floating point)

template<class strategy_t >
typedef jacobian_matrix<strategy_t> blue_sky::calc_model< strategy_t >::jacobian_matrix_t

jacobian_matrix type

template<class strategy_t >
typedef jacobian<strategy_t> blue_sky::calc_model< strategy_t >::jacobian_t

jacobian type

template<class strategy_t >
typedef strategy_t::template vec<main_var_type>::type blue_sky::calc_model< strategy_t >::main_var_array_t

type for array of main_var_type values

template<class strategy_t >
typedef rs_mesh_iface<strategy_t> blue_sky::calc_model< strategy_t >::mesh_iface_t

rs_mesh_iface type

template<class strategy_t >
typedef norms_storage<strategy_t> blue_sky::calc_model< strategy_t >::norms_storage_t

template<class strategy_t >
typedef boost::array<index_t, FI_PHASE_TOT> blue_sky::calc_model< strategy_t >::phase_d_t

type for array of shifts for each phase

template<class strategy_t >
typedef pvt_base< strategy_t > blue_sky::calc_model< strategy_t >::pvt_base_t

type of base pvt class

template<class strategy_t >
typedef pvt_dead_oil< strategy_t > blue_sky::calc_model< strategy_t >::pvt_dead_oil_t

pvt_dead_oil type

template<class strategy_t >
typedef pvt_gas< strategy_t > blue_sky::calc_model< strategy_t >::pvt_gas_t

pvt_gas type

template<class strategy_t >
typedef pvt_oil< strategy_t > blue_sky::calc_model< strategy_t >::pvt_oil_t

pvt_oil type

template<class strategy_t >
typedef pvt_water< strategy_t > blue_sky::calc_model< strategy_t >::pvt_water_t

pvt_water type

template<class strategy_t >
typedef reservoir<strategy_t> blue_sky::calc_model< strategy_t >::reservoir_t

reservoir type

template<class strategy_t >
typedef boost::array<index_t, FI_PHASE_TOT> blue_sky::calc_model< strategy_t >::sat_d_t

type for array of shifts for each phase, for saturation

template<class strategy_t >
typedef scal_3p<strategy_t> blue_sky::calc_model< strategy_t >::scal_3p_t

scal_3p type

template<class strategy_t >
typedef scale_array_holder<strategy_t> blue_sky::calc_model< strategy_t >::scale_array_holder_t

type of holder of scale arrays

template<class strategy_t >
typedef rs_smesh_iface<strategy_t> blue_sky::calc_model< strategy_t >::smesh_iface_t

rs_smesh_iface type

template<class strategy_t >
typedef smart_ptr<connection_t, true> blue_sky::calc_model< strategy_t >::sp_connection_t

smart_ptr to connection type

template<class strategy_t >
typedef smart_ptr<csr_matrix_t, true> blue_sky::calc_model< strategy_t >::sp_csr_matrix_t

smart_ptr to csr_matrix type

template<class strategy_t >
typedef smart_ptr< fi_params, true> blue_sky::calc_model< strategy_t >::sp_fi_params

smart_ptr to fi_params type

template<class strategy_t >
typedef smart_ptr<fip_results_storage, true> blue_sky::calc_model< strategy_t >::sp_fip_results_storage

smart_ptr to fip_results_storage type

template<class strategy_t >
typedef smart_ptr<idata_t, true> blue_sky::calc_model< strategy_t >::sp_idata_t

smart_ptr to idata type

template<class strategy_t >
typedef smart_ptr<jacobian_matrix_t, true> blue_sky::calc_model< strategy_t >::sp_jacobian_matrix_t

smart_ptr to jacobian_matrix type

template<class strategy_t >
typedef smart_ptr<jacobian_t, true> blue_sky::calc_model< strategy_t >::sp_jacobian_t

smart_ptr to jacobian type

template<class strategy_t >
typedef smart_ptr<mesh_iface_t, true> blue_sky::calc_model< strategy_t >::sp_mesh_iface_t

smart_ptr to rs_mesh_iface

template<class strategy_t >
typedef std::vector< sp_pvt_t > blue_sky::calc_model< strategy_t >::sp_pvt_array_t

type for array of pvt_base objects

template<class strategy_t >
typedef smart_ptr<pvt_dead_oil_t, true> blue_sky::calc_model< strategy_t >::sp_pvt_dead_oil

smart_ptr to pvt_dead_oil type

template<class strategy_t >
typedef std::vector< sp_pvt_dead_oil > blue_sky::calc_model< strategy_t >::sp_pvt_dead_oil_array_t

type for array of pvt_dead_oil objects

template<class strategy_t >
typedef smart_ptr<pvt_gas_t, true> blue_sky::calc_model< strategy_t >::sp_pvt_gas

smart_ptr to pvt_gas type

template<class strategy_t >
typedef std::vector< sp_pvt_gas > blue_sky::calc_model< strategy_t >::sp_pvt_gas_array_t

type for array of pvt_gas objects

template<class strategy_t >
typedef smart_ptr<pvt_dead_oil_t, true> blue_sky::calc_model< strategy_t >::sp_pvt_oil

smart_ptr to pvt_dead_oil type

template<class strategy_t >
typedef std::vector< sp_pvt_oil > blue_sky::calc_model< strategy_t >::sp_pvt_oil_array_t

type for array of pvt_dead_oil objects

template<class strategy_t >
typedef smart_ptr<pvt_base_t, true> blue_sky::calc_model< strategy_t >::sp_pvt_t

smart_ptr to pvt_base type

template<class strategy_t >
typedef smart_ptr<pvt_water_t, true> blue_sky::calc_model< strategy_t >::sp_pvt_water

smart_ptr to pvt_water type

template<class strategy_t >
typedef std::vector< sp_pvt_water > blue_sky::calc_model< strategy_t >::sp_pvt_water_array_t

type for array of pvt_water objects

template<class strategy_t >
typedef smart_ptr<reservoir_t, true> blue_sky::calc_model< strategy_t >::sp_reservoir_t

smart_ptr to reservoir type

template<class strategy_t >
typedef smart_ptr< rock_grid< strategy_t >, true> blue_sky::calc_model< strategy_t >::sp_rock_grid

smart_ptr to rock_grid type

template<class strategy_t >
typedef smart_ptr< scal_3p_t, true> blue_sky::calc_model< strategy_t >::sp_scal3p

smart_ptr to scal_3p type

template<class strategy_t >
typedef smart_ptr<scale_array_holder_t, true> blue_sky::calc_model< strategy_t >::sp_scale_array_holder_t

smart_ptr to scale_array_holder type

template<class strategy_t >
typedef smart_ptr<smesh_iface_t, true> blue_sky::calc_model< strategy_t >::sp_smesh_iface_t

smart_ptr to rs_smesh_iface

template<class strategy_t >
typedef smart_ptr<this_t, true> blue_sky::calc_model< strategy_t >::sp_this_t

smart_ptr to this_t type

template<class strategy_t >
typedef smart_ptr<well_results_storage, true> blue_sky::calc_model< strategy_t >::sp_well_results_storage

smart_ptr to well_results_storage type

template<class strategy_t >
typedef smart_ptr<well_t, true> blue_sky::calc_model< strategy_t >::sp_well_t

smart_ptr to well type

template<class strategy_t >
typedef strategy_t blue_sky::calc_model< strategy_t >::strategy_type

strategy_type

template<class strategy_t >
typedef calc_model<strategy_t> blue_sky::calc_model< strategy_t >::this_t

shortname for this type

template<class strategy_t >
typedef std::vector< int > blue_sky::calc_model< strategy_t >::vec_i

vector of int values

template<class strategy_t >
typedef well<strategy_t> blue_sky::calc_model< strategy_t >::well_t

base type for wells


Constructor & Destructor Documentation

template<class strategy_t >
blue_sky::calc_model< strategy_t >::~calc_model (  ) 

calc_model dtor


Member Function Documentation

template<class strategy_t >
restore_solution_return_type blue_sky::calc_model< strategy_t >::apply_newton_correction ( item_t  mult,
index_t  istart_line_search,
const sp_mesh_iface_t mesh,
const sp_jacobian_matrix_t jacobian_mx 
)

applies newton correction and multiplies it by given mult (default 1.0)

Parameters:
mult multiplier
istart_line_search 
mesh pointer to mesh instance
jacobian_mx pointer to jacobian_matrix instance
Returns:
see restore_solution_return_type for more details

template<class strategy_t >
blue_sky::calc_model< strategy_t >::BLUE_SKY_TYPE_DECL_T ( calc_model< strategy_t >   ) 

blue-sky type declaration

template<class strategy_t >
int blue_sky::calc_model< strategy_t >::calc_approx_so_sg_ro ( const item_t  mo_in,
const item_t  mg_in,
const item_t  poro,
const item_t  ifvf_o,
const item_t  ifvf_g,
const item_t  max_ro,
item_t so,
item_t sg,
item_t ro,
main_var_type &  m_var 
)

calculates approximal value of So, Sg, Ro from full mass of gas (mg_in) and oil (mo_in)

Returns:
0
Parameters:
[in] mo_in 
[in] mg_in 
[in] poro 
[in] ifvf_o 
[in] ifvf_g 
[in] max_ro 
[out] so 
[out] sg 
[out] ro 
[out] m_var 

template<class strategy_t >
int blue_sky::calc_model< strategy_t >::calc_equil ( const sp_idata_t input_data,
const sp_mesh_iface_t mesh 
)

calculates equilibrium

Parameters:
input_data pointer to idata instance
mesh pointer to mesh instance
Returns:
0 on success otherwise negative integer value
Todo:
remove return values, throw exceptions instead

template<class strategy_t >
void blue_sky::calc_model< strategy_t >::calc_prev_fluid_volume ( bool  istart,
const sp_mesh_iface_t mesh 
)

calculates fluid volume for previous step

Parameters:
istart is first call on current step
mesh pointer to mesh instance

template<class strategy_t >
int blue_sky::calc_model< strategy_t >::equil_calc_pressure ( item_t  prev_press,
item_t  cur_d,
item_t  h,
index_t  phase,
index_t  i_pvt,
double  rs_type,
item_t  depth_goc,
item_t  rs_dat,
val_vs_depth *  rsvd,
val_vs_depth *  pbvd,
item_t p,
item_t rs = 0 
)

calculates pressure for equil

Returns:
0 on success otherwise negative integer value
Todo:
remove return values, throw exceptions instead
Parameters:
[in] prev_press preview pressure value
[in] cur_d 
[in] h 
[in] phase 
[in] i_pvt 
[in] rs_type 
[in] depth_goc 
[in] rs_dat 
[in] rsvd 
[in] pbvd 
[out] p 
[out] rs 

template<class strategy_t >
index_t blue_sky::calc_model< strategy_t >::gas_shift (  )  const

returns shift value for gas phase

Returns:
phase_d[FI_PHASE_GAS]

template<class strategy_t >
const data_t& blue_sky::calc_model< strategy_t >::get_data ( index_t  n_block  )  const [inline]

return calc_model_data for n_block cell

Parameters:
n_block index of cell in mesh
Returns:
calc_model_data for n_block cell

template<class strategy_t >
item_t blue_sky::calc_model< strategy_t >::get_initial_rho ( item_t  height  )  const

Todo:
obsolete, should be removed

template<class strategy_t >
void blue_sky::calc_model< strategy_t >::init (  ) 

inits calc_model

template<class strategy_t >
void blue_sky::calc_model< strategy_t >::init_boundary_connections ( const sp_idata_t input_data,
const sp_mesh_iface_t mesh 
) [private]

Todo:
obsolete, should be removed

template<class strategy_t >
int blue_sky::calc_model< strategy_t >::init_calcul_arrays ( const sp_idata_t input_data,
const sp_mesh_iface_t mesh 
)

inits arrays for calculation process

Parameters:
input_data pointer to idata instance
mesh pointer to mesh instance
Returns:
0 on success otherwise negative integer value
Todo:
remove return values, throw exceptions instead

template<class strategy_t >
void blue_sky::calc_model< strategy_t >::init_jacobian ( const sp_jacobian_t input_data,
const sp_mesh_iface_t mesh 
)

inits jacobian

Parameters:
input_data pointer to idata instance
mesh pointer to mesh instance

template<class strategy_t >
int blue_sky::calc_model< strategy_t >::init_main_arrays ( const sp_idata_t input_data,
const sp_mesh_iface_t mesh 
)

inits main arrays

Parameters:
input_data pointer to idata instance
mesh pointer to mesh instance
Returns:
0 on success otherwise negative integer value
Todo:
remove return values, throw exceptions instead

template<class strategy_t >
int blue_sky::calc_model< strategy_t >::init_pressure ( const sp_idata_t input_data,
const sp_mesh_iface_t mesh 
)

inits pressure array

Parameters:
input_data pointer to idata instance
mesh pointer to mesh instance
Returns:
0 on success otherwise negative integer value
Todo:
remove return values, throw exceptions instead

template<class strategy_t >
void blue_sky::calc_model< strategy_t >::init_pvt_arrays ( sp_pvt_oil_array_t pvto_,
sp_pvt_gas_array_t pvtg_,
sp_pvt_water_array_t pvtw_,
const sp_idata_t idata_ 
)

inits pvt arrays

Parameters:
pvto_ array of pvt_oil objects
pvtg_ array of pvt_gas objects
pvtw_ array of pvt_water objects
idata_ pointer to idata instance that holds input data for pvt

template<class strategy_t >
int blue_sky::calc_model< strategy_t >::init_rs ( const sp_idata_t input_data,
const sp_mesh_iface_t mesh 
)

inits phases variables (rs) and selest number of phases

Parameters:
input_data pointer to idata instance
mesh pointer to mesh instance
Returns:
0 on success otherwise negative integer value
Todo:
remove return values, throw exceptions instead

template<class strategy_t >
int blue_sky::calc_model< strategy_t >::init_saturation ( const sp_idata_t input_data,
const sp_mesh_iface_t mesh 
)

inits saturation array

Parameters:
input_data pointer to idata instance
mesh pointer to mesh instance
Returns:
0 on success otherwise negative integer value
Todo:
remove return values, throw exceptions instead

template<class strategy_t >
void blue_sky::calc_model< strategy_t >::init_scal (  ) 

inits scal

template<class strategy_t >
bool blue_sky::calc_model< strategy_t >::is_gas (  )  const

returns true if gas phase present in model

Parameters:
phases phases enum
Returns:
true if gas phase present in model

template<class strategy_t >
static bool blue_sky::calc_model< strategy_t >::is_gas_phase ( int  phases  )  [inline, static]

returns true if gas phase present in model

Parameters:
phases phases enum
Returns:
true if gas phase present in model
Todo:
obsolete, should be removed

template<class strategy_t >
bool blue_sky::calc_model< strategy_t >::is_oil (  )  const

returns true if oil phase present in model

Parameters:
phases phases enum
Returns:
true if oil phase present in model

template<class strategy_t >
static bool blue_sky::calc_model< strategy_t >::is_oil_phase ( int  phases  )  [inline, static]

returns true if oil phase present in model

Parameters:
phases phases enum
Returns:
true if oil phase present in model
Todo:
obsolete, should be removed

template<class strategy_t >
bool blue_sky::calc_model< strategy_t >::is_water (  )  const

returns true if water phase present in model

Parameters:
phases phases enum
Returns:
true if water phase present in model

template<class strategy_t >
static bool blue_sky::calc_model< strategy_t >::is_water_phase ( int  phases  )  [inline, static]

returns true if water phase present in model

Parameters:
phases phases enum
Returns:
true if water phase present in model
Todo:
obsolete, should be removed

template<class strategy_t >
int blue_sky::calc_model< strategy_t >::new_simple_get_cell_solution ( const double  mult,
int  istart_linear_search,
const sp_mesh_iface_t msh,
const sp_jacobian_matrix_t jacobian_mx 
)

restores solution from Jacobian (jacobian_matrix), using mult if istart_linear_search != 0

Parameters:
mult x^n = x^(n-1) + mult * dx
istart_linear_search use mult if != 0
Returns:
0 on success

template<class strategy_t >
item_t blue_sky::calc_model< strategy_t >::new_simple_get_cell_solution_mult ( const sp_mesh_iface_t mesh,
const sp_jacobian_matrix_t jacobian_mx 
)

calculates multiplier (m) for newton correction vector (J(x0) * w = -F(x0), x1 = x0 + m * w)

Parameters:
mesh pointer to mesh instance
jacobian_mx pointer to jacobian_matrix instance
Returns:
multiplier value

template<class strategy_t >
item_t blue_sky::calc_model< strategy_t >::new_simple_get_cell_solution_mult_2 ( const sp_mesh_iface_t mesh,
const sp_jacobian_matrix_t jmatrix 
) const

returns multiplier for apply_newton_correction function

Parameters:
mesh pointer to mesh instance
jacobian_mx pointer to jacobian_matrix instance
Returns:
multiplier value

template<class strategy_t >
index_t blue_sky::calc_model< strategy_t >::oil_shift (  )  const

returns shift value for oil phase

Returns:
phase_d[FI_PHASE_OIL]

template<class strategy_t >
const this_t& blue_sky::calc_model< strategy_t >::operator= ( const this_t src  ) 

assignment operator

Parameters:
src reference to calc_model instance
Returns:
this
Todo:
should be removed

template<class strategy_t >
restore_solution_return_type blue_sky::calc_model< strategy_t >::restore_solution ( const sp_mesh_iface_t mesh,
const sp_jacobian_matrix_t jacobian_mx 
)

restores solution from jacobian_matrix

Parameters:
mesh pointer to mesh instance
jacobian_mx pointer to jacobian_matrix instance
Returns:
see restore_solution_return_type for more details

template<class strategy_t >
int blue_sky::calc_model< strategy_t >::set_initial_data ( const sp_idata_t input_data,
const sp_mesh_iface_t mesh 
)

inits initial conditions

Parameters:
input_data pointer to idata instance
mesh pointer to mesh instance
Returns:
0 on success otherwise negative integer value
Todo:
remove return values, throw exceptions instead

template<class strategy_t >
void blue_sky::calc_model< strategy_t >::update_max_pressure_range ( item_t  max_range  ) 

Todo:
obsolete, should be removed

template<class strategy_t >
void blue_sky::calc_model< strategy_t >::update_min_pressure_range ( item_t  min_range  ) 

Todo:
obsolete, should be removed

template<class strategy_t >
index_t blue_sky::calc_model< strategy_t >::water_shift (  )  const

returns shift value for water phase

Returns:
phase_d[FI_PHASE_WATER]


Member Data Documentation

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::approx_flag

flag of initial approximation

template<class strategy_t >
auto_value<double> blue_sky::calc_model< strategy_t >::ave_volume

average volume

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::b_g_g

obsolete

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::b_g_p

obsolete

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::b_g_w

obsolete

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::b_o_g

obsolete

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::b_o_p

obsolete

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::b_o_w

obsolete

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::b_w_g

obsolete

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::b_w_p

obsolete

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::b_w_w

obsolete

template<class strategy_t >
item_array_t blue_sky::calc_model< strategy_t >::bconn_gor

obsolete

template<class strategy_t >
index_array_t blue_sky::calc_model< strategy_t >::bconn_mainvar

obsolete

template<class strategy_t >
item_array_t blue_sky::calc_model< strategy_t >::bconn_pressure

pressure on the boundary

obsolete

template<class strategy_t >
item_array_t blue_sky::calc_model< strategy_t >::bconn_saturation

obsolete

template<class strategy_t >
data_array_t blue_sky::calc_model< strategy_t >::data

array of calc_model_data, length == n_elements

template<class strategy_t >
index_array_t blue_sky::calc_model< strategy_t >::fip_regions

(n_elements) index of FIP region for cell

template<class strategy_t >
sp_fip_results_storage blue_sky::calc_model< strategy_t >::fip_res

storage for fip results

template<class strategy_t >
item_array_t blue_sky::calc_model< strategy_t >::full_step_plane_flow_rate

(n_planes * n_phases) total flow rates on time step

template<class strategy_t >
item_array_t blue_sky::calc_model< strategy_t >::gas_oil_ratio

gas_oil_ratio (n_elements)

template<class strategy_t >
physical_constants blue_sky::calc_model< strategy_t >::internal_constants

physical constants in internal units

template<class strategy_t >
invers_fvf_avgerage_t blue_sky::calc_model< strategy_t >::invers_fvf_average

(n_phases) 1. / (formation volume factor) for all phases average

template<class strategy_t >
index_array_t blue_sky::calc_model< strategy_t >::iwksp

obsolete, n_elements

template<class strategy_t >
auto_value<double> blue_sky::calc_model< strategy_t >::last_c_norm

obsolete

template<class strategy_t >
auto_value<item_t> blue_sky::calc_model< strategy_t >::linear_search_mult

template<class strategy_t >
auto_value<bool> blue_sky::calc_model< strategy_t >::lsearch_force_newton_step

obsolete, force to make newton step in any case

template<class strategy_t >
main_var_array_t blue_sky::calc_model< strategy_t >::main_variable

(n_elements) main variables (Sg or Ro) per each grid block

template<class strategy_t >
sp_csr_matrix_t blue_sky::calc_model< strategy_t >::mat

obsolete

template<class strategy_t >
index_array_t blue_sky::calc_model< strategy_t >::max_norm_counter

obsolete

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::multi_well_in_cell_flag

obsolete, if != 0 use sorting

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_comps

base parameters

number of components

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_fip_regions

number of fip regions

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_HCcomps

number of hydrocarbon components (n_comps = n_HCcomps + 1)

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_HCphases

number of hydrocarbon phases (n_phases = n_HCphases + 1)

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_phases

number of phases

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_pri

number of primary variables

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_pvt_regions

number of pvt regions

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_sat_regions

number of sat regions

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_sec

number of secondary variables

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_sec_vars

number if secondary variables

template<class strategy_t >
auto_value<int> blue_sky::calc_model< strategy_t >::n_vars

full number of variables

template<class strategy_t >
norms_storage_t blue_sky::calc_model< strategy_t >::norm

norm storage

template<class strategy_t >
calc_model_data_tmp_holder_t blue_sky::calc_model< strategy_t >::old_data_

calc_model data stored on previous step

template<class strategy_t >
phase_d_t blue_sky::calc_model< strategy_t >::phase_d

displacement of phase in arrays

template<class strategy_t >
auto_value<FI_PHASE_ENUM> blue_sky::calc_model< strategy_t >::phases

sizeof (int) bit fields (1 -- phase present, 0 -- do not present)

template<class strategy_t >
item_array_t blue_sky::calc_model< strategy_t >::plane_flow_rate

(n_planes * n_phases) flow rates for all planes on current time step

template<class strategy_t >
item_array_t blue_sky::calc_model< strategy_t >::pressure

pressure (n_elements)

template<class strategy_t >
calc_model_data_tmp_holder_t blue_sky::calc_model< strategy_t >::prev_niter_data_

calc_model data stored on previous newton iteration

template<class strategy_t >
sp_pvt_gas_array_t blue_sky::calc_model< strategy_t >::pvt_gas_array

array of pvt_gas objects, length == n_pvt_regions

template<class strategy_t >
sp_pvt_dead_oil_array_t blue_sky::calc_model< strategy_t >::pvt_oil_array

array of pvt_oil objects, length == n_pvt_regions

template<class strategy_t >
index_array_t blue_sky::calc_model< strategy_t >::pvt_regions

(n_elements) index of PVT table for given block zero base

template<class strategy_t >
sp_pvt_water_array_t blue_sky::calc_model< strategy_t >::pvt_water_array

array of pvt_water objects, length == n_pvt_regions

template<class strategy_t >
sp_rock_grid blue_sky::calc_model< strategy_t >::rock_grid_prop

rock and grid properties

template<class strategy_t >
index_array_t blue_sky::calc_model< strategy_t >::rock_regions

(n_elements) index of ROCK regions

template<class strategy_t >
std::vector<rocktab_table <base_strategy_fi> > blue_sky::calc_model< strategy_t >::rocktab

(rocktab table)

template<class strategy_t >
auto_value<RPO_MODEL_ENUM, RPO_DEFAULT_MODEL> blue_sky::calc_model< strategy_t >::rpo_model

3-ph oil relative permeability model: flag 0, 1 or 2 (stone model)

template<class strategy_t >
sat_d_t blue_sky::calc_model< strategy_t >::sat_d

displacement of phase in saturation array

template<class strategy_t >
index_array_t blue_sky::calc_model< strategy_t >::sat_regions

(n_elements) index of SAT table for given block zero base

template<class strategy_t >
item_array_t blue_sky::calc_model< strategy_t >::saturation_3p

(n_phases * n_elements)

template<class strategy_t >
sp_scal3p blue_sky::calc_model< strategy_t >::scal_prop

scal properties

template<class strategy_t >
sp_fi_params blue_sky::calc_model< strategy_t >::ts_params

input model params

template<class strategy_t >
auto_value<well_model_type, BLACK_OIL> blue_sky::calc_model< strategy_t >::well_model_type_

well model type

template<class strategy_t >
auto_value<well_model_var_type, WELL_MODEL_3VAR> blue_sky::calc_model< strategy_t >::well_model_var_

well model var type

template<class strategy_t >
sp_well_results_storage blue_sky::calc_model< strategy_t >::well_res

storage for well results

template<class strategy_t >
item_array_t blue_sky::calc_model< strategy_t >::workspace

obsolete, n_elements * (n_phase)


The documentation for this class was generated from the following file:

Generated on Fri Nov 13 12:07:13 2009 for TheBSEagleProject by  doxygen 1.5.8