MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
main.f90
1 
9 
10 
40 
41 
42 PROGRAM pc_saft
43 !
44 ! ----------------------------------------------------------------------
45  USE basic_variables
46  USE eos_constants
47  USE dft_module
48  USE eos_variables!, ONLY: dd_term, qq_term, dq_term
49  IMPLICIT NONE
50 
54 
55  REAL :: tc,pc,chempot_total(nc)
56  REAL :: rhob(2,0:nc),density(np)
57  CHARACTER (LEN=50) :: filename
58  INTEGER :: compid,i
59  REAL :: cif(nc)
60 
64 
65  filename='./in.txt'
66  CALL file_open(filename,77)
67  READ (77,*) t
68  READ (77,*) ncomp ! read number of components in the system
69  Do i = 1,ncomp ! read component names
70  READ (77,*) compna(i)
71  End Do
72  Do i = 1,ncomp ! read component overall molar concentrations
73  READ (77,*) xif(i)
74  End Do
75 
76 
77 
78  !calculate molar fractions from molar concentrations
79  !xif(1:ncomp) = cif(1:ncomp) / sum(cif(1:ncomp))
80 
81 
82 
86 
87  num = 1 ! (num=0: using analytical derivatives of EOS)
88  ! (num=1: using numerical derivatives of EOS)
89  ! (num=2: White's renormalization group theory)
90  IF ( num /= 0 ) CALL set_default_eos_numerical
91 
92 
93  eos = 1
94  pol = 1
95 
96  p = 1.000e05
97 
98  CALL para_input ! retriev pure comp. parameters
99 
100  ensemble_flag = 'tp' ! this specifies, whether the eos-subroutines
101  ! are executed for constant 'tp' or for constant 'tv'
102 
103 
107 
108  CALL eos_const (ap, bp, dnm)
109 
110  dd_term = 'GV' ! dipole-dipole term of Gross & Vrabec (2006)
111  qq_term = 'JG' ! quadrupole-quadrupole term of Gross (2005)
112  dq_term = 'VG' ! dipole-quadrupole term of Vrabec & Gross (2008)
113 
114 
115 
116  CALL vle_mix(rhob,density,chempot_total,compid)
117 
118 
119 END PROGRAM pc_saft
120 
121 
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW This module contains paramete...
Definition: modules.f90:200
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW Module DFT_MODULE This module...
Definition: modules.f90:272
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW This module contains paramete...
Definition: modules.f90:120
subroutine vle_mix(rhob, density, chemPot_total, user)
Definition: VLE_main.F90:7
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW This module contains paramete...
Definition: modules.f90:29
program pc_saft
Starting Point of PC-SAFT program.
Definition: main_prog.f90:32