Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MixtGasLiq_P.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 ! ******************************************************************************
24 !
25 ! Purpose: Collect relations for mixture pressure for gas-liquid model.
26 !
27 ! Description: None.
28 !
29 ! Notes:
30 ! 1. Use Dz instead of Do because of conflict with DO keyword in Fortran.
31 !
32 ! ******************************************************************************
33 !
34 ! $Id: MixtGasLiq_P.F90,v 1.3 2008/12/06 08:44:09 mtcampbe Exp $
35 !
36 ! Copyright: (c) 2006 by the University of Illinois
37 !
38 ! ******************************************************************************
39 
40 FUNCTION mixtgasliq_p(DYl,DYv,DYg,Cl2,Cv2,Cg2,D,Dz,Po,To,Bp,Bt,T)
41 
42  USE moddatatypes
43 
44  IMPLICIT NONE
45 
46  REAL(RFREAL), INTENT(IN) :: bp,bt,cg2,cl2,cv2,d,dz,dyg,dyl,dyv,po,t,to
47  REAL(RFREAL) :: mixtgasliq_p
48 
49  REAL(RFREAL) :: term1,term2
50 
51  term1 = cl2*(dz + bt*(t-to) - bp*po - dyl) - (dyv*cv2 + dyg*cg2)
52  term2 = 4.0_rfreal*cl2*(dz + bt*(t-to) - bp*po)*(dyv*cv2 + dyg*cg2)
53 
54  mixtgasliq_p = 0.5_rfreal*(-term1 + sqrt(term1*term1 + term2))
55 
56 END FUNCTION mixtgasliq_p
57 
58 ! ******************************************************************************
59 !
60 ! RCS Revision history:
61 !
62 ! $Log: MixtGasLiq_P.F90,v $
63 ! Revision 1.3 2008/12/06 08:44:09 mtcampbe
64 ! Updated license.
65 !
66 ! Revision 1.2 2008/11/19 22:17:22 mtcampbe
67 ! Added Illinois Open Source License/Copyright
68 !
69 ! Revision 1.1 2006/03/26 20:20:50 haselbac
70 ! Initial revision
71 !
72 ! ******************************************************************************
73 
74 
75 
76 
77 
78 
79 
const NT & d
double sqrt(double d)
Definition: double.h:73
real(rfreal) function mixtgasliq_p(DYl, DYv, DYg, Cl2, Cv2, Cg2, D, Dz, Po, To, Bp, Bt, T)
RT dz() const
Definition: Direction_3.h:133