MAMMA  1.0
Conduitsolver
Functions/Subroutines | Variables
steady_solver Module Reference

Steady state equations integration. More...

Functions/Subroutines

subroutine steady_shooting
 Shooting Method. More...
 
subroutine integrate_equations (qp, flag_output, extrap_z, extrap_z_p, extrap_z_mach, extrap_flag, r_p_1, r_p_2, mach)
 Steady state integration. More...
 
subroutine perturbe_qp (qp)
 Solution preturbation. More...
 
subroutine advance_dz (qp, dz, check_convergence)
 Solution advance in space. More...
 
subroutine eval_f (qp_rel, qp_org, dz, coeff_f, right_term, scal_f)
 Nonlinear function evaluation. More...
 
subroutine eval_jacobian (qp_rel, qp_org, dz, coeff_f, left_matrix)
 Jacobian evaluation. More...
 
subroutine steady_lnsrch (x_rel_init, x_org, scal_f_old, grad_f, desc_dir, dz, coeff_f, x_rel_new, scal_f, f_nl, stpmax, check, callf)
 Search the descent stepsize. More...
 
subroutine linear_extrapolation (zeta_old, qp_old, zeta, qp, extrap_z, extrap_z_p, extrap_z_mach, extrap_flag)
 Linear extrapolation of the solution. More...
 

Variables

real *8 zeta
 
real *8, dimension(:), allocatable fluxes_old
 
real *8, dimension(:), allocatable nh_terms_old
 
real *8 zeta_old
 
real *8 dz_max
 
logical increase_flow_rate
 
integer nl_iter
 

Detailed Description

Steady state equations integration.

This module contains the subroutine for the integration of the model equations with the shooting technique.

Date
07/09/2012
Author
Mattia de' Michieli Vitturi

Function/Subroutine Documentation

subroutine steady_solver::advance_dz ( real*8, dimension(n_eqns), intent(inout)  qp,
real*8, intent(in)  dz,
logical, intent(out)  check_convergence 
)

Solution advance in space.

This subroutine integrates the conservative variables in space from zeta to zeta+dz.

Parameters
[in,out]qpactual physical variables
[in]dzintegration step
[out]check_convergencelogical for convergence check
Date
07/09/2012
Author
Mattia de' Michieli Vitturi

Definition at line 1271 of file steady_solver.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine steady_solver::eval_f ( real*8, dimension(:), intent(in)  qp_rel,
real*8, dimension(:), intent(in)  qp_org,
real*8, intent(in)  dz,
real*8, dimension(:), intent(in)  coeff_f,
real*8, dimension(:), intent(out)  right_term,
real*8, intent(out)  scal_f 
)

Nonlinear function evaluation.

This subroutine evaluates the residual of the nonlinear functions obtained from the integration in space of the steady equations.

Parameters
[in]qp_relactual physical variables
[in]qp_orgactual physical variables
[in]dzintegration step
[in]coeff_fweighting coefficients
[out]right_termarray of residuals
[out]scal_fmagnitude of the array of residuals
Date
07/09/2012
Author
Mattia de' Michieli Vitturi

Definition at line 1621 of file steady_solver.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine steady_solver::eval_jacobian ( real*8, dimension(n_vars), intent(in)  qp_rel,
real*8, dimension(n_vars), intent(in)  qp_org,
real*8, intent(in)  dz,
real*8, dimension(n_eqns), intent(in)  coeff_f,
real*8, dimension(n_eqns,n_eqns), intent(out)  left_matrix 
)

Jacobian evaluation.

This subroutine evaluates with a complex step derivative procedure the Jacobian of the nonlinear system obtained from the integration in space of the steady equations.

Parameters
[in]qp_relactual physical variables
[in]qp_orgactual physical variables
[in]dzintegration step
[in]coeff_fweighting coefficients
[out]left_matrixJacobian matrix
Date
07/09/2012
Author
Mattia de' Michieli Vitturi

Definition at line 1702 of file steady_solver.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine steady_solver::integrate_equations ( real*8, dimension(n_eqns), intent(inout)  qp,
logical, intent(in)  flag_output,
real*8, intent(out)  extrap_z,
real*8, intent(out)  extrap_z_p,
real*8, intent(out)  extrap_z_mach,
integer, intent(out)  extrap_flag,
real*8, intent(out)  r_p_1,
real*8, intent(out)  r_p_2,
real*8, intent(out)  mach 
)

Steady state integration.

This subroutine integrate the steady equations for magma ascent along the conduit, givent the state qp at the base of the conduit. The integration ends if one of the top boundary condition is reached befor the top or if the top of the conduit is reached.

Parameters
[in,out]qpphysical variables at the inlet
[in]flag_outputflag to determine if the output has to be saved
[out]extrap_zdepht at which the bdry condition is reached
[out]extrap_z_pdepht at which the bdry condition is reached
[out]extrap_z_machdepht at which the bdry condition is reached
[out]extrap_flagflag for the bdry condition reached
[out]r_p_1exit phase 1 pressure
[out]r_p_2exit phase 2 (exsolved gas) pressure
[out]machMach at the exit
Date
15/08/2011
Author
Mattia de' Michieli Vitturi

Integration step

Sound speed of the mixture

Variables used to define the new value of the integration step

Solution at the computational grid point

Solution at the previous integration step

Solution obtained integrating with full step

Solution obtained integrating with one half step

Solution obtained integrating with two half steps

Definition at line 625 of file steady_solver.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine steady_solver::linear_extrapolation ( real*8, intent(in)  zeta_old,
real*8, dimension(n_eqns), intent(in)  qp_old,
real*8, intent(in)  zeta,
real*8, dimension(n_eqns), intent(in)  qp,
real*8, intent(out)  extrap_z,
real*8, intent(out)  extrap_z_p,
real*8, intent(out)  extrap_z_mach,
integer, intent(out)  extrap_flag 
)

Linear extrapolation of the solution.

This subroutine extrapolate linearly some primitive variables of the solution to find where the boundary conditions are reached (below or above the vent).

Parameters
[in]zeta_oldzeta at the previous step
[in]qp_oldphysical variables at the previous step
[in]zetaactual zeta
[in]qpphysical conservative variables
[out]extrap_zzeta at which the boundary condition is reached
[out]extrap_z_pzeta at which the boundary condition is reached
[out]extrap_z_machzeta at which the boundary condition is reached
[out]extrap_flagflag for the boundary condition reached first
Date
07/09/2012
Author
Mattia de' Michieli Vitturi

Definition at line 2004 of file steady_solver.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine steady_solver::perturbe_qp ( real*8, dimension(n_vars), intent(inout)  qp)

Solution preturbation.

This subroutine perturbes the initial guess for the Newthon-Raphson method in order to improve the convergence.

Parameters
[in,out]qpphysical variables
Date
08/07/2013
Author
Mattia de' Michieli Vitturi

Definition at line 1240 of file steady_solver.f90.

Here is the caller graph for this function:

subroutine steady_solver::steady_lnsrch ( real*8, dimension(:), intent(in)  x_rel_init,
real*8, dimension(:), intent(in)  x_org,
real*8, intent(in)  scal_f_old,
real*8, dimension(:), intent(in)  grad_f,
real*8, dimension(:), intent(inout)  desc_dir,
real*8, intent(in)  dz,
real*8, dimension(:), intent(in)  coeff_f,
real*8, dimension(:), intent(out)  x_rel_new,
real*8, intent(out)  scal_f,
real*8, dimension(:), intent(out)  f_nl,
real*8, intent(in)  stpmax,
logical, intent(out)  check,
  callf 
)

Search the descent stepsize.

This subroutine search for the lenght of the descent step in order to have a decrease in the nonlinear function.

Parameters
[in]x_rel_initcoefficients for initial guess
[in]x_orginitial guess
[in]scal_f_oldold value of the function f
[in]grad_fgradient of the f
[in,out]desc_dirdescent direction
[in]dzintegration step
[in]coeff_fweighting coefficients
[out]x_rel_newoptimal solution
[out]scal_fnew value of the function f (at x_new)
[out]f_nlvalues of the vector function f_nl
[in]stpmaxmax number of steps
[out]checklogical for convergence
[in]callfname of the subroutine for the function f
Date
07/09/2012
Author
Mattia de' Michieli Vitturi
Parameters
[in]x_rel_initInitial point
[in]x_orgInitial point
[in]grad_fGradient at xold
[in]scal_f_oldValue of the function at xold
[in,out]desc_dirDescent direction (usually Newton direction)
[out]x_rel_newUpdated solution
[out]scal_fValue of the scalar function at x
[out]f_nlValues of the nonlinear functions at x
[out]checkOutput quantity check is false on a normal exit

Definition at line 1790 of file steady_solver.f90.

Here is the caller graph for this function:

subroutine steady_solver::steady_shooting ( )

Shooting Method.

This subroutine search for the steady solution using a Shooting Method for Two-Point Boundary Value Problems. A bisection method is used to find the value of inlet velocity, in order to reach the desired prescribed boundary condition at the exit.

Date
13/03/2013
Author
Mattia de' Michieli Vitturi

Definition at line 65 of file steady_solver.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

real*8 steady_solver::dz_max

Definition at line 44 of file steady_solver.f90.

real*8, dimension(:), allocatable steady_solver::fluxes_old

Definition at line 41 of file steady_solver.f90.

logical steady_solver::increase_flow_rate

Definition at line 46 of file steady_solver.f90.

real*8, dimension(:), allocatable steady_solver::nh_terms_old

Definition at line 42 of file steady_solver.f90.

integer steady_solver::nl_iter

Definition at line 48 of file steady_solver.f90.

real*8 steady_solver::zeta

Definition at line 40 of file steady_solver.f90.

real*8 steady_solver::zeta_old

Definition at line 44 of file steady_solver.f90.