Skip to content

Commit

Permalink
Merge pull request #4 from ucns3d-team/MULTIPHASE
Browse files Browse the repository at this point in the history
Multiphase updated the EOS
  • Loading branch information
TakisCFD authored Apr 28, 2020
2 parents d39427f + 5474858 commit cb6ba6a
Show file tree
Hide file tree
Showing 58 changed files with 115,496 additions and 1,341 deletions.
7 changes: 7 additions & 0 deletions CODE/MULTISPECIES.DAT
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
!------------MULTI-SPECIES DAT FILE-----!
!--------------UCNS3D-------------------!
2 !NUMBER OF SPECIES
1.66 1.4 !GAMMAS
1.0 0.0 !INFLOW VOLUME FRACTION
10.0 0.125 !INFLOW DENSITIES
0.0 0.0 !STIFFENED EOS PRESSURES
48 changes: 27 additions & 21 deletions CODE/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
##intel fortran
F90=mpiifort

## gfortran
#F90=mpifc

##intel
#F90=mpiifort
#GFORTRAN
F90=mpif90
LD=$(F90)
ifdef HPCTOOLKIT
$(info HPCToolkit is loaded - building version for profiling)
Expand All @@ -13,28 +11,36 @@ else
DBGFLAGS=
endif

ifdef MKLROOT
#intel MKL

ifdef MKLROOT

###!GFORTRAN WITH MKL
#BLASFLAGS=-I${F95ROOT}/include/intel64/lp64 -m64 -I${MKLROOT}/include
#BLASLIBS=${F95ROOT}/lib/intel64/libmkl_blas95_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_gf_lp64.a ${MKLROOT}/lib/intel64/libmkl_sequential.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl
#BLASFLAGS= -I${MKLROOT}/include
#BLASLIBS= -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_sequential.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl
#else
# $(error MKLROOT not set. Typing 'module load mkl' may help)
#endif

##INTEL FORTRAN WITH MKL
BLASFLAGS=-I$(MKLROOT)/include/intel64/lp64 -I$(MKLROOT)/include
BLASLIBS= ${MKLROOT}/lib/intel64/libmkl_blas95_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl
#open blas

else
$(error MKLROOT not set. Typing 'module load mkl' may help)
endif
BLASFLAGS= -I /usr/local/include ###Ensure that you include your BLAS library path here
BLASLIBS= -L/usr/local/lib -lopenblas ###Ensure that you include your BLAS library path here

OFLAGS=
##INTEL COMPILER INSTRUCTIONS
#FFLAGS=-i4 -r8 -O0 -g -debug all -xHost -traceback -qopenmp -qopenmp-link=static $(BLASFLAGS) -check bounds -fp-model strict -debug inline-debug-info -zero
FFLAGS=-i4 -r8 $(DBGFLAGS) -O2 -ipo -xHost -fp-model fast=2 -zero -qopenmp -qopenmp-link=static $(BLASFLAGS) #NEW WAY 30% FASTER

##GFORTRAN COMPILE INSTRUCTIONS
#FFLAGS=-ffree-line-length-none -fdefault-real-8 -fdefault-double-8 -fbackslash -O0 -fcray-pointer -Wno-lto-type-mismatch -DGNU -static $(BLASFLAGS)
#intel compilers
# debug run
#=-i4 -r8 -O0 -g -debug all -xHost -traceback -qopenmp -qopenmp-link=static $(BLASFLAGS) -check bounds -fp-model strict -debug inline-debug-info -zero
# production run
#FFLAGS=-i4 -r8 $(DBGFLAGS) -O3 -ipo -xHost -fp-model precise -zero -qopenmp -qopenmp-link=static $(BLASFLAGS)

##
#gfortran
#debug run
#FFLAGS=-ffree-line-length-none -fdefault-real-8 -fopenmp -Wall -fbounds-check -finit-local-zero -fdump-parse-tree -fdump-core -fbacktrace -fdefault-double-8 -fbackslash -O0 -fcray-pointer -Wno-lto-type-mismatch -static $(BLASFLAGS)
#production run
FFLAGS=-fdefault-real-8 -fdefault-double-8 -fbackslash -fopenmp -ffree-line-length-none -fcray-pointer -Ofast -Wno-lto-type-mismatch -static $(BLASFLAGS)


LIBS =$(BLASLIBS) -lstdc++

Expand Down
16 changes: 8 additions & 8 deletions CODE/declarations.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MODULE DECLARATION
!oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!
!--------------------------------------------------------------------------------------------------------------------------!

INTEGER::pdim,M2,DIMENSIONA,LOWMEM,binio,nof_variables,CHUNK_N,dims,IRES_TURB,CODE_PROFILE,IRES_UNSTEADY,LAMPS,itotalb,totiw,number_of_dog,B_CODE,ICONS_S,ICONS_E,ICOMPACT,EES,iscoun,itold,lmach_style,WEIGHT_LSQR !DIMENSIONS OF PROBLEM
INTEGER::multispecies,nof_species,pdim,M2,DIMENSIONA,LOWMEM,binio,nof_variables,CHUNK_N,dims,IRES_TURB,CODE_PROFILE,IRES_UNSTEADY,LAMPS,itotalb,totiw,number_of_dog,B_CODE,ICONS_S,ICONS_E,ICOMPACT,EES,iscoun,itold,lmach_style,WEIGHT_LSQR !DIMENSIONS OF PROBLEM
integer::governingequations,guassianquadra,temporder,iboundary,wenocnschar,required,nodes_i,SWIRL,IADAPT,TECPLOT,STENCIL_IO,SURFSHEAR,ISSF,n_node,ELEM_DEC,n_boundaries,NUMBER_OF_NEI,FASTEST_Q,STATISTICS
integer,allocatable,DIMENSION(:,:)::jtot1,jtot2,jtot3,jtot
integer::jtotAL,JTOTAL1,JTOTAL2,JTOTAL3,compwrt,varcons,pointx,llx
Expand Down Expand Up @@ -161,7 +161,7 @@ MODULE DECLARATION
!oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!
!--------------------------------------------------------------------------------------------------------------------------!
REAL::wenocentralweight,TIMESTEP,oo2,zero,voltemp,SHEAR_TEMP,forcex,forcey,forcez,extf,vorder
REAL::XD1 !X COORDINATES USED FOR THE POLYNOMIALS DERIVATIVES
REAL::XD1,MP_SOURCE1,MP_SOURCE2,MP_SOURCE3 !X COORDINATES USED FOR THE POLYNOMIALS DERIVATIVES
REAL::YD1 !Y COORDINATES USED FOR THE POLYNOMIALS DERIVATIVES
REAL::ZD1 !Z COORDINATES USED FOR THE POLYNOMIALS DERIVATIVES
REAL::ANGLEFACEY !ANGLE OF A FACE WITH RESPECT TO SPHERICAL COORDINATES THETA
Expand Down Expand Up @@ -210,7 +210,7 @@ MODULE DECLARATION
REAL::FIRSTRESK !RESIDUAL DIMENSIONAL MEAN FLOW
REAL::FIRSTRESOMEGA !RESIDUAL DIMENSIONAL MEAN FLOW
REAL::FIRSTRESPASS !RESIDUAL DIMENSIONAL MEAN FLOW
REAL::GAMMA !GAS CONSTANT
REAL::GAMMA,GAMMAL,GAMMAR,MP_PINFL,MP_PINFR !GAS CONSTANT
REAL::UVEL !U VELOCITY
REAL::UFREESTREAM !U VELOCITY
REAL::VVEL !V-VELOCITY
Expand All @@ -225,7 +225,7 @@ MODULE DECLARATION
REAL::LAMX !FLAGS TO BE USED FOR RESTARTING
REAL::LAMY !FLAGS TO BE USED FOR RESTARTING
REAL::LAMZ !FLAGS TO BE USED FOR RESTARTING
!FLAGS TO BE USED FOR RESTARTING
REAL::ALPHA,BETA !FLAGS TO BE USED FOR RESTARTING
REAL::OUT_TIME !FINAL TIME TO WRITE OUTPUT FOR UNSTEADY SIMULATIONS
REAL::XPER !PERIODICITY IN X AXIS
REAL::YPER !PERIODICITY IN Y AXIS
Expand Down Expand Up @@ -294,13 +294,13 @@ MODULE DECLARATION
REAL,ALLOCATABLE,DIMENSION(:,:,:)::ba_char,a_char
real::a_rot,c_rot,b_rot,root_rot,sheartemp
REAL,ALLOCATABLE,DIMENSION(:)::WEIGHT_T2
!$OMP THREADPRIVATE(b_char,x_Char,INSTEN,llx,varcons,pointx,ba_char,a_char,ICONS_S,ICONS_E,compwrt,ILOCALALLELGD,ILOCALALLELG3,STCON,STCONC,STCONS,STCONG,ISOSA,IX,IFSAT,IISTART,SHEARTEMP,IMAX,NUMBER_OF_NEI,b_code,INUM,angle1,angle2,IDEG,n_node,inump,INUMO,inumo2,ideg2,m2,inump2,imax2,A_ROT,C_ROT,B_ROT,ROOT_ROT,ANGLEFACEX,ANGLEFACEY,voltemp)
!$OMP THREADPRIVATE(MP_SOURCE1,MP_SOURCE2,MP_SOURCE3,b_char,x_Char,INSTEN,llx,varcons,pointx,ba_char,a_char,ICONS_S,ICONS_E,compwrt,ILOCALALLELGD,ILOCALALLELG3,STCON,STCONC,STCONS,STCONG,ISOSA,IX,IFSAT,IISTART,SHEARTEMP,IMAX,NUMBER_OF_NEI,b_code,INUM,angle1,angle2,IDEG,n_node,inump,INUMO,inumo2,ideg2,m2,inump2,imax2,A_ROT,C_ROT,B_ROT,ROOT_ROT,ANGLEFACEX,ANGLEFACEY,voltemp)
REAL,ALLOCATABLE,DIMENSION(:,:)::VVA,VVA1,lscqm1,xxder,yyder,zzder
REAL,ALLOCATABLE,DIMENSION(:)::B1_imp,DU1,DU2,DUMMY12,C1_imp,DUR,DUL,DURR,DULR,DUT1,B1T,DUMMY12T,SOURCE_T,sb,DETA,UTMIN,UTMAX,VVr1,VVr2,VVr3,VVR4,VVwg,VVnpox,VVnpoy,VVnpoz,VVwpox,VVwpoy,VVwpoz,VVnxi,VVneta,VVnzeta,VVxi,VVeta,VVzeta,VVnallx,VVnally,VVnallz,VVB,VVC,VVD,VVE,VVF,vvjacobsurf,vvjacobvolume
!$OMP THREADPRIVATE(sb,IBFC,lamx,lamy,lamz,number_of_dog,WEIGHT_T2,lscqm1,B1_imp,DU1,DU2,DUMMY12,xxder,yyder,zzder,C1_imp,DUR,DUL,DURR,DULR,DUT1,B1T,DUMMY12T,SOURCE_T,UTMIN,UTMAX,ax,ay,az,nx,ny,nz,nnx,nny,nnz,VVA,DETA,VVA1,VVr1,VVr2,VVr3,VVR4,VVwg,VVnpox,VVnpoy,VVnpoz,VVwpox,VVwpoy,VVwpoz,VVnxi,VVneta,VVnzeta,VVxi,VVeta,VVzeta,VVnallx,VVnally,VVnallz,VVB,VVC,VVD,VVE,VVF,vvjacobsurf,vvjacobvolume)


REAL,ALLOCATABLE,DIMENSION(:)::CLEFT,lamc !VALUE OF THE RECONSTRUCTED SOLUTION REFERING TO MY CELL (I) CONSERVED VARIABLE
REAL,ALLOCATABLE,DIMENSION(:)::gamma_IN,MP_IE,MP_A,MP_AR,MP_R,MP_R_IN,MP_A_IN,MP_PINF !MULTIPHASE COMPONENTS
REAL,ALLOCATABLE,DIMENSION(:)::CLEFT,lamc !VALUE OF THE RECONSTRUCTED SOLUTION REFERING TO MY CELL (I) CONSERVED VARIABLE
REAL,ALLOCATABLE,DIMENSION(:)::CLEFT_ROT !VALUE OF THE RECONSTRUCTED SOLUTION REFERING TO MY CELL (I) ROTATED WITH RESPECT TO ITS FACE CONSERVED VARIABLE
REAL,ALLOCATABLE,DIMENSION(:)::CRIGHT !VALUE OF THE RECONSTRUCTED SOLUTION REFERING TO THE NEIGHBOUR OF MY CELL (I) CONSERVED VARIABLE
REAL,ALLOCATABLE,DIMENSION(:)::CRIGHT_ROT !VALUE OF THE RECONSTRUCTED SOLUTION REFERING TO THE NEIGHBOUR OF MY CELL (I) ROTATED WITH RESPECT TO ITS FACE CONSERVED VARIABLE
Expand Down Expand Up @@ -410,7 +410,7 @@ MODULE DECLARATION

!$OMP THREADPRIVATE(IXX,JXX,KXX,LXX1,NUMBER,ICONSIDERED,X1,Y1,Z1,facex,ixxff,iconsi,lxx,VECCOS)

!$OMP THREADPRIVATE(CLEFT,cleft_rot,cright,cright_rot,sl,sr,sm,HLLCFLUX)
!$OMP THREADPRIVATE(CLEFT,cleft_rot,gammaL,MP_PINFL,MP_PINFR,GAMMAR,MP_IE,MP_AR,MP_R,MP_A,cright,cright_rot,sl,sr,sm,HLLCFLUX)
!$OMP THREADPRIVATE(RHLLCFLUX,ROTVL,ROTVR,SUBSON1,SUBSON2,SUBSON3,CTURBL,CTURBr)
!$OMP THREADPRIVATE(turbc1,turbc2,tempflux2,TRI,INVTRI,ROTVECT,VECTCO,VEIGL,VEIGR,RVEIGL,RVEIGR,EIGVL,EIGVR,POX,POY,POZ)

Expand Down
Loading

0 comments on commit cb6ba6a

Please sign in to comment.