~asc/fluidity/iceshelfcavity

« back to all changes in this revision

Viewing changes to legacy_reservoir_prototype/tests/CompModel_1d_2Phases_3Components_NonEquilibrium/InputComp2P3C_Comp2.f90

  • Committer: Adam Candy
  • Date: 2011-10-12 20:39:04 UTC
  • Revision ID: adam.candy@imperial.ac.uk-20111012203904-9gwqzs4z798zcw0l
Automatic sync to launchpad

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
program main
3
 
  implicit none
4
 
  integer :: cv_nonods, nphase, ncomp, dummy
5
 
  real, dimension( : ), allocatable :: comp
6
 
  ! Local variables
7
 
  integer :: icomp, iphase, i
8
 
  ! K_Comp based upon data on Table 6 of Analytical Methods in 
9
 
  ! Improved Oil Recovery -- Tara LaForce
10
 
  ! Assuming Comp_1(Phase Liq)
11
 
 
12
 
 
13
 
  open( 5, file = 'filedim', status = 'unknown' )
14
 
  read( 5, * ) cv_nonods, nphase, ncomp, dummy
15
 
  close( 5 )
16
 
 
17
 
  allocate( comp( cv_nonods * nphase * ncomp ))
18
 
 
19
 
  comp = 0.
20
 
 
21
 
  ! Component 1, Phase 2:
22
 
  icomp = 1
23
 
  iphase = 2
24
 
  comp(( icomp - 1 ) * nphase * cv_nonods + ( iphase - 1 ) * cv_nonods + 1 : &
25
 
       ( icomp - 1 ) * nphase * cv_nonods + iphase * cv_nonods ) = 0.10
26
 
 
27
 
  ! Component 2, Phase 2:
28
 
  icomp = 2
29
 
  iphase = 2
30
 
  comp(( icomp - 1 ) * nphase * cv_nonods + ( iphase - 1 ) * cv_nonods + 1 : &
31
 
       ( icomp - 1 ) * nphase * cv_nonods + iphase * cv_nonods ) = 0.25
32
 
 
33
 
  ! Component 3, Phase 2:
34
 
  icomp = 3
35
 
  iphase = 2
36
 
  comp(( icomp - 1 ) * nphase * cv_nonods + ( iphase - 1 ) * cv_nonods + 1 : &
37
 
       ( icomp - 1 ) * nphase * cv_nonods + iphase * cv_nonods ) = 0.65
38
 
 
39
 
  do i = 1, cv_nonods * nphase * ncomp
40
 
     print*, comp( i )
41
 
  end do
42
 
 
43
 
end program main