yaeos__equilibria_boundaries_generalized_isopleths Module

Calculation of isoplethic phase equilibria lines.

This module contains the subroutines to calculate any kind of phase equilibria lines with constant composition.


Uses

  • module~~yaeos__equilibria_boundaries_generalized_isopleths~~UsesGraph module~yaeos__equilibria_boundaries_generalized_isopleths yaeos__equilibria_boundaries_generalized_isopleths module~yaeos__constants yaeos__constants module~yaeos__equilibria_boundaries_generalized_isopleths->module~yaeos__constants module~yaeos__equilibria_equilibrium_state yaeos__equilibria_equilibrium_state module~yaeos__equilibria_boundaries_generalized_isopleths->module~yaeos__equilibria_equilibrium_state module~yaeos__equilibria_stability yaeos__equilibria_stability module~yaeos__equilibria_boundaries_generalized_isopleths->module~yaeos__equilibria_stability module~yaeos__math yaeos__math module~yaeos__equilibria_boundaries_generalized_isopleths->module~yaeos__math module~yaeos__models_ar yaeos__models_ar module~yaeos__equilibria_boundaries_generalized_isopleths->module~yaeos__models_ar iso_fortran_env iso_fortran_env module~yaeos__constants->iso_fortran_env module~yaeos__equilibria_equilibrium_state->module~yaeos__constants module~yaeos__equilibria_stability->module~yaeos__constants module~yaeos__equilibria_stability->module~yaeos__models_ar module~yaeos__models_base yaeos__models_base module~yaeos__equilibria_stability->module~yaeos__models_base module~yaeos__models_ge yaeos__models_ge module~yaeos__equilibria_stability->module~yaeos__models_ge module~yaeos__math->module~yaeos__constants module~yaeos__math_continuation yaeos__math_continuation module~yaeos__math->module~yaeos__math_continuation module~yaeos__math_linalg yaeos__math_linalg module~yaeos__math->module~yaeos__math_linalg module~yaeos__models_ar->module~yaeos__constants module~yaeos__models_ar->module~yaeos__models_base module~yaeos__math_continuation->module~yaeos__constants module~yaeos__math_continuation->module~yaeos__math_linalg module~yaeos__math_linalg->module~yaeos__constants module~yaeos__substance yaeos__substance module~yaeos__models_base->module~yaeos__substance module~yaeos__models_ge->module~yaeos__constants module~yaeos__models_ge->module~yaeos__models_base module~yaeos__substance->module~yaeos__constants

Used by

  • module~~yaeos__equilibria_boundaries_generalized_isopleths~~UsedByGraph module~yaeos__equilibria_boundaries_generalized_isopleths yaeos__equilibria_boundaries_generalized_isopleths module~yaeos__equilibria yaeos__equilibria module~yaeos__equilibria->module~yaeos__equilibria_boundaries_generalized_isopleths module~yaeos yaeos module~yaeos->module~yaeos__equilibria

Derived Types

type, public ::  GeneralizedIsoZLine

Components

Type Visibility Attributes Name Initial
logical, public :: did_stability = .false.
logical, public :: found_unstability = .false.
type(MPEquilibriumState), public, allocatable :: points(:)
real(kind=pr), public, allocatable :: w_more_stable(:)

Functions

public function create_generalized_isoz_line(model, nc, np, nstab, kinds_x, kind_w, z, x_l0, w0, betas0, P0, T0, spec_variable, spec_variable_value, ns0, S0, dS0, ws_stab, max_points)

Create a new generalized line. This function initializes a new instance of the GeneralizedLine type.

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: model
integer, intent(in) :: nc
integer, intent(in) :: np
integer, intent(in) :: nstab
character(len=14), intent(in) :: kinds_x(np)
character(len=14), intent(in) :: kind_w
real(kind=pr), intent(in) :: z(nc)
real(kind=pr), intent(in) :: x_l0(np,nc)
real(kind=pr), intent(in) :: w0(nc)
real(kind=pr), intent(in) :: betas0(np+1)
real(kind=pr), intent(in) :: P0
real(kind=pr), intent(in) :: T0
integer, intent(in) :: spec_variable
real(kind=pr), intent(in) :: spec_variable_value
integer, intent(in) :: ns0
real(kind=pr), intent(in) :: S0
real(kind=pr), intent(in) :: dS0
real(kind=pr), intent(in), optional :: ws_stab(nstab,nc)
integer, intent(in), optional :: max_points

Return Value type(GeneralizedIsoZLine)


Subroutines

public subroutine pt_F_NP(model, z, np, kinds_x, kind_w, X, ns1, S1, ns2, S2, F, df)

Function to solve at each point of a multi-phase envelope.

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: model

Model to use.

real(kind=pr), intent(in) :: z(:)

Mixture global composition.

integer, intent(in) :: np

Number of main phases.

character(len=14), intent(in) :: kinds_x(np)

Kind of the main phases.

character(len=14), intent(in) :: kind_w

Kind of the reference phase.

real(kind=pr), intent(in) :: X(:)

Vector of variables.

integer, intent(in) :: ns1

Number of first specification.

real(kind=pr), intent(in) :: S1

First specification value.

integer, intent(in) :: ns2

Number of second specification.

real(kind=pr), intent(in) :: S2

Second specification value.

real(kind=pr), intent(out) :: F(size(X))

Vector of functions valuated.

real(kind=pr), intent(out) :: df(size(X),size(X))

Jacobian matrix.

public subroutine solve_generalized_point(model, z, np, kinds_x, kind_w, X, ns1, S1, ns2, S2, max_iters, F, df, iters)

Function to solve the multiphase flash problem.

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: model

Model to use.

real(kind=pr), intent(in) :: z(:)

Mixture global composition.

integer, intent(in) :: np

Number of x phases.

character(len=14), intent(in) :: kinds_x(np)

Kind of the x phases.

character(len=14), intent(in) :: kind_w

Kind of the w phase.

real(kind=pr), intent(inout) :: X(:)

Vector of variables.

integer, intent(in) :: ns1

Number of first specification.

real(kind=pr), intent(in) :: S1

First specification value.

integer, intent(in) :: ns2

Number of second specification.

real(kind=pr), intent(in) :: S2

Second specification value.

integer, intent(in) :: max_iters

Maximum number of iterations.

real(kind=pr), intent(out) :: F(size(X))

Vector of functions valuated.

real(kind=pr), intent(out), dimension(size(X), size(X)) :: df

Jacobian matrix.

integer, intent(out) :: iters

Number of iterations performed.