ICFERST
22-06
Reservoir simulator based on DCVFEM, Dynamic Mesh optimisation and Surface-based modelling
|
This module enables the multiphase prototype code to interact with state by copying everything required from state to ICFERST, adaptive time-stepping, outfluxes computation, tunneled BCs and Darcy velocity. More...
Functions/Subroutines | |
subroutine, public | get_primary_scalars_new (state, Mdims) |
This subroutine extracts all primary variables associated with the mesh from state, and associated them with the variables used in the MultiFluids model. More... | |
subroutine, public | compute_node_global_numbers (state, ndgln) |
This subroutine calculates the global node numbers requested to operates in ICFERST. More... | |
subroutine, public | get_ele_type (x_nloc, cv_ele_type, p_ele_type, u_ele_type, mat_ele_type, u_sele_type, cv_sele_type) |
: Obtain the type of element u_ele_type = cv_ele_type = p_ele_type will flag the dimension and type of element: = 1 or 2: 1D (linear and quadratic, respectively) -NOT SUPPORTED- = 3 or 4: triangle (linear or quadratic, respectively) = 5 or 6: quadrilateral (bi-linear or tri-linear, respectively)-NOT SUPPORTED- = 7 or 8: tetrahedron (linear or quadratic, respectively) = 9 or 10: hexahedron (bi-linear or tri-linear, respectively) -NOT SUPPORTED- More... | |
subroutine, public | get_ele_type_new (Mdims, Mdisopt) |
: Obtains the element type Mdisoptu_ele_type = Mdisoptcv_ele_type = Mdisoptp_ele_type will flag the dimension and type of element: = 1 or 2: 1D (linear and quadratic, respectively) -NOT SUPPORTED- = 3 or 4: triangle (linear or quadratic, respectively) = 5 or 6: quadrilateral (bi-linear or tri-linear, respectively) -NOT SUPPORTED- = 7 or 8: tetrahedron (linear or quadratic, respectively) = 9 or 10: hexahedron (bi-linear or tri-linear, respectively) -NOT SUPPORTED- More... | |
subroutine, public | get_discretisation_options (state, Mdims, Mdisopt) |
: This subroutine extract all discretisation options from the schema DISOPT Options: =0 1st order in space Theta=specified UNIVERSAL =1 1st order in space Theta=non-linear UNIVERSAL =2 Trapezoidal rule in space Theta=specified UNIVERSAL =2 if isotropic limiter then FEM-quadratic & stratification adjust. Theta=non-linear =3 Trapezoidal rule in space Theta=non-linear UNIVERSAL =4 Finite elements in space Theta=specified UNIVERSAL =5 Finite elements in space Theta=non-linear UNIVERSAL =6 Finite elements in space Theta=specified NONE =7 Finite elements in space Theta=non-linear NONE =8 Finite elements in space Theta=specified DOWNWIND+INTERFACE TRACKING =9 Finite elements in space Theta=non-linear DOWNWIND+INTERFACE TRACKING More... | |
subroutine, public | pack_multistate (npres, state, packed_state, multiphase_state, multicomponent_state, pmulti_state) |
: This subroutine creates packed_state from state(:) and links the appropiate memory so it is acessible from both states. This subroutine also introduces fields not used by fludity but required by IC-FERST More... | |
subroutine, public | prepare_absorptions (state, Mdims, multi_absorp) |
: Prepares the memory to compute absorption fields More... | |
type(vector_field) function, public | as_vector (tfield, dim, slice) |
: This function points a tensor field as a vector field type This is necessary when solving for tensor fields that are actually multiphase vector fields. More... | |
type(vector_field) function, public | as_packed_vector (tfield) |
: This function points a tensor field as a vector field type This is necessary when solving for tensor fields that are actually multiphase vector fields. More... | |
subroutine, public | finalise_multistate (packed_state, multiphase_state, multicomponent_state) |
: Destrys packed_state and the passed down states More... | |
subroutine, public | adaptive_nonlinear (Mdims, packed_state, reference_field, its, Repeat_time_step, ExitNonLinearLoop, nonLinearAdaptTs, old_acctim, order, calculate_mass_delta, adapt_mesh_in_FPI, Accum_Courant, Courant_tol, Current_Courant, first_time_step) |
: This subroutine either store variables before the nonlinear timeloop starts, or checks how the nonlinear iterations are going and depending on that increase the timestep or decreases the timestep and repeats that timestep More... | |
real function, public | inf_norm_scalar_normalised (tracer, reference_tracer, dumping, totally_min_max) |
Calculate the inf norm of the normalised field, so the field goes from 0 to 1 It requires as inputs the tracer to be used and the reference tracer to normallise, the dumping to be set to 1.0 and totally_min_max which includes the min max values of the field across all processors also for normalisation. More... | |
real function, public | get_convergence_functional (phasevolumefraction, reference_sat, dumping, its) |
: We create a potential to optimize F = sum (f**2), so the solution is when this potential reaches a minimum. Typically the value to consider convergence is the sqrt(epsilon of the machine), i.e. 10^-8 f = (NewSat-OldSat)/Number of nodes; this is the typical approach for algebraic non linear systems More... | |
subroutine, public | get_var_from_packed_state (packed_state, FEDensity, OldFEDensity, IteratedFEDensity, Density, OldDensity, IteratedDensity, PhaseVolumeFraction, OldPhaseVolumeFraction, IteratedPhaseVolumeFraction, Velocity, OldVelocity, IteratedVelocity, FEPhaseVolumeFraction, OldFEPhaseVolumeFraction, IteratedFEPhaseVolumeFraction, NonlinearVelocity, OldNonlinearVelocity, IteratedNonlinearVelocity, ComponentDensity, OldComponentDensity, IteratedComponentDensity, ComponentMassFraction, OldComponentMassFraction, Temperature, OldTemperature, IteratedTemperature, FETemperature, OldFETemperature, IteratedFETemperature, IteratedComponentMassFraction, FEComponentDensity, OldFEComponentDensity, IteratedFEComponentDensity, FEComponentMassFraction, OldFEComponentMassFraction, IteratedFEComponentMassFraction, Pressure, FEPressure, OldFEPressure, CVPressure, OldCVPressure, CV_Immobile_Fraction, Coordinate, VelocityCoordinate, PressureCoordinate, MaterialCoordinate, CapPressure, Immobile_fraction, EndPointRelperm, RelpermExponent, Cap_entry_pressure, Cap_exponent, Imbibition_term, Concentration, OldConcentration, IteratedConcentration, FEConcentration, OldFEConcentration, IteratedFEConcentration, Enthalpy, OldEnthalpy, IteratedEnthalpy, FEEnthalpy, OldFEEnthalpy, IteratedFEEnthalpy) |
@DEPRECATED: Gets memory from packed state This subroutine returns a pointer to the desired values of a variable stored in packed state All the input variables (but packed_stated) are pointers following the structure of the *_ALL variables and also all of them are optional, hence you can obtaine whichever you want More... | |
subroutine, public | printcsrmatrix (Matrix, find, col, dim_same_row) |
: Subroutine to print CSR matrix by (row, column) Dimensions and phases are printed in different rows So for example Matrix(2,2,10) with two rows would be presented as a matrix ( 8 x 10) More... | |
logical function, public | is_constant (tfield) |
: Checks whether a field is constant or not More... | |
character(len=field_name_len) function, public | getoldname (tfield) |
: For a given field, retrieve the associated old field name More... | |
character(len=field_name_len) function, public | getfemname (tfield) |
: For a given field, retrieve the associated finite element field name More... | |
subroutine, public | calculate_internal_volume (packed_state, Mdims, mass_ele, calculate_mass, cv_ndgln, DEN_ALL, eles_with_pipe) |
: Subroutine to calculate the integrated mass inside the domain More... | |
logical function, public | have_option_for_any_phase (path, nphase) |
: Subroutine to check whether an option is true for any phase in diamond, if any is true it returns true. The path must be the part of the path inside the phase, i.e. /multiphase_properties/capillary_pressure More... | |
subroutine, public | get_darcyvelocity (Mdims, ndgln, state, packed_state, upwnd) |
: This subroutine calculates the actual Darcy velocity, but with P0DG precision only! More... | |
subroutine, public | dump_outflux (current_time, itime, outfluxes) |
: Subroutine that dumps the total flux at a given timestep across all specified boundaries to a file called 'simulation_name_outfluxes.csv'. In addition, the time integrated flux up to the current timestep is also outputted to this file. Integration boundaries are specified in diamond via surface_ids. (In diamond this option can be found under "/io/dump_boundaryflux/surface_ids" and the user should specify an integer array containing the IDs of every boundary they wish to integrate over). More... | |
subroutine, public | update_outfluxes (bcs_outfluxes, outfluxes, sele, cv_nodi, suf_area, Vol_flux, Mass_flux, tracer, outfluxes_fields, start_phase, end_phase) |
: Updates the outfluxes information based on NDOTQNEW, shape functions and transported fields for a given GI point in a certain element This subroutine should only be called if SELE is on the BOUNDARY Example of Mass_flux: ndotq(iphase) * SdevFunsDETWEI(gi) * LIMT(iphase) Example of Vol_flux: ndotq(iphase) * SdevFunsDETWEI(gi) * LIMDT(iphase) More... | |
subroutine, public | enterforcebalanceequation (EnterSolve, its, itime, acctim, t_adapt_threshold, after_adapt, after_adapt_itime, PVF_cfl) |
:–A Subroutine that returns a Logical, either to Enter the Force Balance Eqs or Not = given a requested_cfl_pressure it will skip the ForceBalanceEquation that many times = while if I have adaptive mesh it will solve the ForceBalanceEquation after each adapt_time_steps = The Subroutive also account for delaying adaptivity and swich between cfl_pressure and after_adapt= More... | |
subroutine, public | impose_connected_bcs (outfluxes, packed_state, Mdims, acctime) |
: Using the outfluxes values, it imposes as BC the averaged value of another BC(from within the domain) It is a basic method to get this functionality but it will work in parallel. However, it does not guarantee mass conservation as it uses the value from the previous time-step although it can still be used for many cases such as ATES, or ventilation. Overwrites the dirichlet BC values. Currently it uses the information from outfluxes so it is MANDATORY to use and request outfluxes for those BCs More... | |
This module enables the multiphase prototype code to interact with state by copying everything required from state to ICFERST, adaptive time-stepping, outfluxes computation, tunneled BCs and Darcy velocity.
subroutine, public copy_outof_state::adaptive_nonlinear | ( | type(multi_dimensions), intent(in) | Mdims, |
type(state_type), intent(inout) | packed_state, | ||
real, dimension(:,:,:), intent(inout), allocatable | reference_field, | ||
integer, intent(inout) | its, | ||
logical, intent(inout) | Repeat_time_step, | ||
logical, intent(inout) | ExitNonLinearLoop, | ||
logical, intent(in) | nonLinearAdaptTs, | ||
real, intent(in) | old_acctim, | ||
integer, intent(in) | order, | ||
real, dimension(:,:), optional | calculate_mass_delta, | ||
logical, intent(in), optional | adapt_mesh_in_FPI, | ||
real, intent(in), optional | Accum_Courant, | ||
real, intent(in), optional | Courant_tol, | ||
real, intent(in), optional | Current_Courant, | ||
logical, intent(in), optional | first_time_step | ||
) |
: This subroutine either store variables before the nonlinear timeloop starts, or checks how the nonlinear iterations are going and depending on that increase the timestep or decreases the timestep and repeats that timestep
Mdims | Data type storing all the dimensions describing the mesh, fields, nodes, etc |
packed_state | Linked list with the fields for ICFERST |
reference_field | Field stored at the beginning of the non-linear loop to check convergence |
old_acctim | Previous actual time |
Repeat_time_step,ExitNonLinearLoop | |
its | Non-linear time iteration WARNING: not to be modified unless VERY sure |
nonLinearAdaptTs | Flag controlling if we have adaptive time-step or not |
order | Flag controlling what are we doing. 1)Store or get from backup; 2)Calculate and store reference_field; |
adapt_mesh_in_FPI,first_time_step | |
Accum_Courant,Courant_tol,Current_Courant | |
calculate_mass_delta | 1st item holds the mass at previous Linear time step, 2nd item is the delta between mass at the current FPI and 1st item |
type(vector_field) function, public copy_outof_state::as_packed_vector | ( | type(tensor_field), intent(inout) | tfield | ) |
: This function points a tensor field as a vector field type This is necessary when solving for tensor fields that are actually multiphase vector fields.
type(vector_field) function, public copy_outof_state::as_vector | ( | type(tensor_field), intent(inout) | tfield, |
integer, intent(in) | dim, | ||
integer, intent(in), optional | slice | ||
) |
: This function points a tensor field as a vector field type This is necessary when solving for tensor fields that are actually multiphase vector fields.
subroutine, public copy_outof_state::calculate_internal_volume | ( | type(state_type), intent(inout) | packed_state, |
type(multi_dimensions), intent(in) | Mdims, | ||
real, dimension( : ), intent(in) | mass_ele, | ||
real, dimension(:), intent(inout) | calculate_mass, | ||
integer, dimension(:), intent(in) | cv_ndgln, | ||
real, dimension( :, : ), intent(in) | DEN_ALL, | ||
type(pipe_coords), dimension(:), intent(in), optional | eles_with_pipe | ||
) |
: Subroutine to calculate the integrated mass inside the domain
packed_state | |
Mdims | |
mass_ele | volume of the element, split into cv_nloc equally sized pieces (barycenter) |
cv_ndgln | local to global of the CV mesh only |
DEN_ALL | density of the field |
eles_with_pipe | list of element that contain a well/pipe |
calculate_mass | Output field containing all the mass within the domain |
subroutine, public copy_outof_state::compute_node_global_numbers | ( | type( state_type ), dimension( : ), intent(in) | state, |
type(multi_ndgln), intent(inout) | ndgln | ||
) |
This subroutine calculates the global node numbers requested to operates in ICFERST.
subroutine, public copy_outof_state::dump_outflux | ( | real, intent(in) | current_time, |
integer, intent(in) | itime, | ||
type (multi_outfluxes), intent(inout) | outfluxes | ||
) |
: Subroutine that dumps the total flux at a given timestep across all specified boundaries to a file called 'simulation_name_outfluxes.csv'. In addition, the time integrated flux up to the current timestep is also outputted to this file. Integration boundaries are specified in diamond via surface_ids. (In diamond this option can be found under "/io/dump_boundaryflux/surface_ids" and the user should specify an integer array containing the IDs of every boundary they wish to integrate over).
current_time | actual time |
itime | time-level in integer format |
outfluxes | multi_outfluxes field containing the data required to create the output csv file |
subroutine, public copy_outof_state::enterforcebalanceequation | ( | logical, intent(inout) | EnterSolve, |
integer, intent(in) | its, | ||
integer, intent(in) | itime, | ||
real, intent(in) | acctim, | ||
real, intent(in) | t_adapt_threshold, | ||
logical, intent(in) | after_adapt, | ||
logical, intent(inout) | after_adapt_itime, | ||
real, intent(in) | PVF_cfl | ||
) |
:–A Subroutine that returns a Logical, either to Enter the Force Balance Eqs or Not = given a requested_cfl_pressure it will skip the ForceBalanceEquation that many times = while if I have adaptive mesh it will solve the ForceBalanceEquation after each adapt_time_steps = The Subroutive also account for delaying adaptivity and swich between cfl_pressure and after_adapt=
subroutine, public copy_outof_state::finalise_multistate | ( | type(state_type) | packed_state, |
type(state_type), dimension(:), pointer | multiphase_state, | ||
type(state_type), dimension(:), pointer | multicomponent_state | ||
) |
: Destrys packed_state and the passed down states
real function, public copy_outof_state::get_convergence_functional | ( | real, dimension(:,:), intent(in) | phasevolumefraction, |
real, dimension(:,:), intent(in) | reference_sat, | ||
real, intent(in) | dumping, | ||
integer, intent(in), optional | its | ||
) |
: We create a potential to optimize F = sum (f**2), so the solution is when this potential reaches a minimum. Typically the value to consider convergence is the sqrt(epsilon of the machine), i.e. 10^-8 f = (NewSat-OldSat)/Number of nodes; this is the typical approach for algebraic non linear systems
The convergence is independent of the dumping parameter and measures how the previous iteration (i.e. using the previous dumping parameter) performed
subroutine, public copy_outof_state::get_darcyvelocity | ( | type(multi_dimensions), intent(in) | Mdims, |
type(multi_ndgln), intent(in) | ndgln, | ||
type( state_type ), dimension( : ), intent(inout) | state, | ||
type(state_type), intent(in) | packed_state, | ||
type (porous_adv_coefs), intent(inout) | upwnd | ||
) |
: This subroutine calculates the actual Darcy velocity, but with P0DG precision only!
subroutine, public copy_outof_state::get_discretisation_options | ( | type( state_type ), dimension( : ), intent(in) | state, |
type(multi_dimensions), intent(in) | Mdims, | ||
type (multi_discretization_opts) | Mdisopt | ||
) |
: This subroutine extract all discretisation options from the schema DISOPT Options: =0 1st order in space Theta=specified UNIVERSAL =1 1st order in space Theta=non-linear UNIVERSAL =2 Trapezoidal rule in space Theta=specified UNIVERSAL =2 if isotropic limiter then FEM-quadratic & stratification adjust. Theta=non-linear =3 Trapezoidal rule in space Theta=non-linear UNIVERSAL =4 Finite elements in space Theta=specified UNIVERSAL =5 Finite elements in space Theta=non-linear UNIVERSAL =6 Finite elements in space Theta=specified NONE =7 Finite elements in space Theta=non-linear NONE =8 Finite elements in space Theta=specified DOWNWIND+INTERFACE TRACKING =9 Finite elements in space Theta=non-linear DOWNWIND+INTERFACE TRACKING
subroutine, public copy_outof_state::get_ele_type | ( | integer, intent(in) | x_nloc, |
integer, intent(inout) | cv_ele_type, | ||
integer, intent(inout) | p_ele_type, | ||
integer, intent(inout) | u_ele_type, | ||
integer, intent(inout), optional | mat_ele_type, | ||
integer, intent(inout), optional | u_sele_type, | ||
integer, intent(inout), optional | cv_sele_type | ||
) |
: Obtain the type of element u_ele_type = cv_ele_type = p_ele_type will flag the dimension and type of element: = 1 or 2: 1D (linear and quadratic, respectively) -NOT SUPPORTED- = 3 or 4: triangle (linear or quadratic, respectively) = 5 or 6: quadrilateral (bi-linear or tri-linear, respectively)-NOT SUPPORTED- = 7 or 8: tetrahedron (linear or quadratic, respectively) = 9 or 10: hexahedron (bi-linear or tri-linear, respectively) -NOT SUPPORTED-
subroutine, public copy_outof_state::get_ele_type_new | ( | type(multi_dimensions), intent(in) | Mdims, |
type (multi_discretization_opts) | Mdisopt | ||
) |
: Obtains the element type Mdisoptu_ele_type = Mdisoptcv_ele_type = Mdisoptp_ele_type will flag the dimension and type of element: = 1 or 2: 1D (linear and quadratic, respectively) -NOT SUPPORTED- = 3 or 4: triangle (linear or quadratic, respectively) = 5 or 6: quadrilateral (bi-linear or tri-linear, respectively) -NOT SUPPORTED- = 7 or 8: tetrahedron (linear or quadratic, respectively) = 9 or 10: hexahedron (bi-linear or tri-linear, respectively) -NOT SUPPORTED-
subroutine, public copy_outof_state::get_primary_scalars_new | ( | type( state_type ), dimension( : ), intent(in) | state, |
type (multi_dimensions) | Mdims | ||
) |
This subroutine extracts all primary variables associated with the mesh from state, and associated them with the variables used in the MultiFluids model.
subroutine, public copy_outof_state::get_var_from_packed_state | ( | type(state_type), intent(inout) | packed_state, |
real, dimension(:,:), optional, pointer | FEDensity, | ||
real, dimension(:,:), optional, pointer | OldFEDensity, | ||
real, dimension(:,:), optional, pointer | IteratedFEDensity, | ||
real, dimension(:,:), optional, pointer | Density, | ||
real, dimension(:,:), optional, pointer | OldDensity, | ||
real, dimension(:,:), optional, pointer | IteratedDensity, | ||
real, dimension(:,:), optional, pointer | PhaseVolumeFraction, | ||
real, dimension(:,:), optional, pointer | OldPhaseVolumeFraction, | ||
real, dimension(:,:), optional, pointer | IteratedPhaseVolumeFraction, | ||
real, dimension(:,:,:), optional, pointer | Velocity, | ||
real, dimension(:,:,:), optional, pointer | OldVelocity, | ||
real, dimension(:,:,:), optional, pointer | IteratedVelocity, | ||
real, dimension(:,:), optional, pointer | FEPhaseVolumeFraction, | ||
real, dimension(:,:), optional, pointer | OldFEPhaseVolumeFraction, | ||
real, dimension(:,:), optional, pointer | IteratedFEPhaseVolumeFraction, | ||
real, dimension(:,:,:), optional, pointer | NonlinearVelocity, | ||
real, dimension(:,:,:), optional, pointer | OldNonlinearVelocity, | ||
real, dimension(:,:,:), optional, pointer | IteratedNonlinearVelocity, | ||
real, dimension(:,:,:), optional, pointer | ComponentDensity, | ||
real, dimension(:,:,:), optional, pointer | OldComponentDensity, | ||
real, dimension(:,:,:), optional, pointer | IteratedComponentDensity, | ||
real, dimension(:,:,:), optional, pointer | ComponentMassFraction, | ||
real, dimension(:,:,:), optional, pointer | OldComponentMassFraction, | ||
real, dimension(:,:), optional, pointer | Temperature, | ||
real, dimension(:,:), optional, pointer | OldTemperature, | ||
real, dimension(:,:), optional, pointer | IteratedTemperature, | ||
real, dimension(:,:), optional, pointer | FETemperature, | ||
real, dimension(:,:), optional, pointer | OldFETemperature, | ||
real, dimension(:,:), optional, pointer | IteratedFETemperature, | ||
real, dimension(:,:,:), optional, pointer | IteratedComponentMassFraction, | ||
real, dimension(:,:,:), optional, pointer | FEComponentDensity, | ||
real, dimension(:,:,:), optional, pointer | OldFEComponentDensity, | ||
real, dimension(:,:,:), optional, pointer | IteratedFEComponentDensity, | ||
real, dimension(:,:,:), optional, pointer | FEComponentMassFraction, | ||
real, dimension(:,:,:), optional, pointer | OldFEComponentMassFraction, | ||
real, dimension(:,:,:), optional, pointer | IteratedFEComponentMassFraction, | ||
real, dimension(:,:,:), optional, pointer | Pressure, | ||
real, dimension(:,:,:), optional, pointer | FEPressure, | ||
real, dimension(:,:,:), optional, pointer | OldFEPressure, | ||
real, dimension(:,:,:), optional, pointer | CVPressure, | ||
real, dimension(:,:,:), optional, pointer | OldCVPressure, | ||
real, dimension(:,:), optional, pointer | CV_Immobile_Fraction, | ||
real, dimension(:,:), optional, pointer | Coordinate, | ||
real, dimension(:,:), optional, pointer | VelocityCoordinate, | ||
real, dimension(:,:), optional, pointer | PressureCoordinate, | ||
real, dimension(:,:), optional, pointer | MaterialCoordinate, | ||
real, dimension(:,:), optional, pointer | CapPressure, | ||
real, dimension(:,:), optional, pointer | Immobile_fraction, | ||
real, dimension(:,:), optional, pointer | EndPointRelperm, | ||
real, dimension(:,:), optional, pointer | RelpermExponent, | ||
real, dimension(:,:), optional, pointer | Cap_entry_pressure, | ||
real, dimension(:,:), optional, pointer | Cap_exponent, | ||
real, dimension(:,:), optional, pointer | Imbibition_term, | ||
real, dimension(:,:), optional, pointer | Concentration, | ||
real, dimension(:,:), optional, pointer | OldConcentration, | ||
real, dimension(:,:), optional, pointer | IteratedConcentration, | ||
real, dimension(:,:), optional, pointer | FEConcentration, | ||
real, dimension(:,:), optional, pointer | OldFEConcentration, | ||
real, dimension(:,:), optional, pointer | IteratedFEConcentration, | ||
real, dimension(:,:), optional, pointer | Enthalpy, | ||
real, dimension(:,:), optional, pointer | OldEnthalpy, | ||
real, dimension(:,:), optional, pointer | IteratedEnthalpy, | ||
real, dimension(:,:), optional, pointer | FEEnthalpy, | ||
real, dimension(:,:), optional, pointer | OldFEEnthalpy, | ||
real, dimension(:,:), optional, pointer | IteratedFEEnthalpy | ||
) |
@DEPRECATED: Gets memory from packed state This subroutine returns a pointer to the desired values of a variable stored in packed state All the input variables (but packed_stated) are pointers following the structure of the *_ALL variables and also all of them are optional, hence you can obtaine whichever you want
If we want to get the velocity and the phasevolumefraction one should proceed this way: Define variables: real, dimension(:,:,:), pointer :: Velocity_pointer real, dimension(:,:), pointer :: PhaseVolumeFraction_pointer Assign the pointers call get_var_from_packed_state(packed_state, Velocity = Velocity_pointer, PhaseVolumeFraction = PhaseVolumeFraction_pointer)
In this way we only have to introduce the name of the variables we want to get from packed_state
character (len=field_name_len) function, public copy_outof_state::getfemname | ( | type(tensor_field), intent(in) | tfield | ) |
: For a given field, retrieve the associated finite element field name
character (len=field_name_len) function, public copy_outof_state::getoldname | ( | type(tensor_field), intent(in) | tfield | ) |
: For a given field, retrieve the associated old field name
logical function, public copy_outof_state::have_option_for_any_phase | ( | character (len=*), intent(in) | path, |
integer, intent(in) | nphase | ||
) |
: Subroutine to check whether an option is true for any phase in diamond, if any is true it returns true. The path must be the part of the path inside the phase, i.e. /multiphase_properties/capillary_pressure
subroutine, public copy_outof_state::impose_connected_bcs | ( | type (multi_outfluxes), intent(inout) | outfluxes, |
type(state_type), intent(in) | packed_state, | ||
type(multi_dimensions), intent(in) | Mdims, | ||
real, intent(in) | acctime | ||
) |
: Using the outfluxes values, it imposes as BC the averaged value of another BC(from within the domain) It is a basic method to get this functionality but it will work in parallel. However, it does not guarantee mass conservation as it uses the value from the previous time-step although it can still be used for many cases such as ATES, or ventilation. Overwrites the dirichlet BC values. Currently it uses the information from outfluxes so it is MANDATORY to use and request outfluxes for those BCs
real function, public copy_outof_state::inf_norm_scalar_normalised | ( | real, dimension(:,:), intent(in) | tracer, |
real, dimension(:,:), intent(in) | reference_tracer, | ||
real, intent(in) | dumping, | ||
real, dimension(2), intent(in) | totally_min_max | ||
) |
Calculate the inf norm of the normalised field, so the field goes from 0 to 1 It requires as inputs the tracer to be used and the reference tracer to normallise, the dumping to be set to 1.0 and totally_min_max which includes the min max values of the field across all processors also for normalisation.
logical function, public copy_outof_state::is_constant | ( | type(tensor_field), intent(in) | tfield | ) |
: Checks whether a field is constant or not
subroutine, public copy_outof_state::pack_multistate | ( | integer, intent(in) | npres, |
type(state_type), dimension(:), intent(inout) | state, | ||
type(state_type), intent(inout) | packed_state, | ||
type(state_type), dimension(:), intent(inout), pointer | multiphase_state, | ||
type(state_type), dimension(:), intent(inout), pointer | multicomponent_state, | ||
type(state_type), dimension(:,:), optional, pointer | pmulti_state | ||
) |
: This subroutine creates packed_state from state(:) and links the appropiate memory so it is acessible from both states. This subroutine also introduces fields not used by fludity but required by IC-FERST
subroutine, public copy_outof_state::prepare_absorptions | ( | type(state_type), dimension(:), intent(inout) | state, |
type(multi_dimensions), intent(in) | Mdims, | ||
type(multi_absorption), intent(inout) | multi_absorp | ||
) |
: Prepares the memory to compute absorption fields
subroutine, public copy_outof_state::printcsrmatrix | ( | real, dimension(:,:,:), intent(in) | Matrix, |
integer, dimension(:), intent(in) | find, | ||
integer, dimension(:), intent(in) | col, | ||
logical, intent(in), optional | dim_same_row | ||
) |
: Subroutine to print CSR matrix by (row, column) Dimensions and phases are printed in different rows So for example Matrix(2,2,10) with two rows would be presented as a matrix ( 8 x 10)
subroutine, public copy_outof_state::update_outfluxes | ( | real, dimension(:, :,0:), intent(inout) | bcs_outfluxes, |
type (multi_outfluxes), intent(inout) | outfluxes, | ||
integer, intent(in) | sele, | ||
integer, intent(in) | cv_nodi, | ||
real, intent(in) | suf_area, | ||
real, dimension(:), intent(in) | Vol_flux, | ||
real, dimension(:), intent(in) | Mass_flux, | ||
type (tensor_field), intent(in), pointer | tracer, | ||
type (tensor_field_pointer), dimension(:) | outfluxes_fields, | ||
integer, intent(in) | start_phase, | ||
integer, intent(in) | end_phase | ||
) |
: Updates the outfluxes information based on NDOTQNEW, shape functions and transported fields for a given GI point in a certain element This subroutine should only be called if SELE is on the BOUNDARY Example of Mass_flux: ndotq(iphase) * SdevFunsDETWEI(gi) * LIMT(iphase) Example of Vol_flux: ndotq(iphase) * SdevFunsDETWEI(gi) * LIMDT(iphase)
bcs_outfluxes | the total mass entering the domain is captured by 'bcs_outfluxes' |
outfluxes | multi_outfluxes field containing the data required to create the output csv file |
sele | current surface element |
cv_nodi | current control volume |
suf_area | surface area |
Vol_flux | ndotq(iphase) * SdevFunsDETWEI(gi) * LIMT(iphase) |
Mass_flux | ndotq(iphase) * SdevFunsDETWEI(gi) * LIMDT(iphase) (includes tracer and density!) |
tracer | field being transported/computed |
outfluxes_fields | to extract also from active/passive tracers |
start_phase,end_phase | Initial and final phase to be considered here |