Skip to content

Commit

Permalink
Merge pull request #51 from IvanMary69/main
Browse files Browse the repository at this point in the history
FastS: correction BC mineur pour generation auto
  • Loading branch information
IvanMary69 authored Dec 2, 2024
2 parents c776238 + 72a8d73 commit 5cebd2f
Show file tree
Hide file tree
Showing 35 changed files with 492 additions and 136 deletions.
3 changes: 1 addition & 2 deletions Fast/FastS/FastS/BC/BCInflowFichSA_i.for
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
li = indbci(j, k )
#include "FastS/BC/BCInflowFich.for"
#include "FastS/BC/BCInflowFich_i.for"
rop(l,6) = nutilde(li)
3 changes: 1 addition & 2 deletions Fast/FastS/FastS/BC/BCInflowFichSA_j.for
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
li = indbci(i, k )
#include "FastS/BC/BCInflowFich.for"
#include "FastS/BC/BCInflowFich_j.for"
rop(l,6) = nutilde(li)
3 changes: 1 addition & 2 deletions Fast/FastS/FastS/BC/BCInflowFichSA_k.for
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
li = indbci(i, j )
#include "FastS/BC/BCInflowFich.for"
#include "FastS/BC/BCInflowFich_k.for"
rop(l,6) = nutilde(li)
26 changes: 26 additions & 0 deletions Fast/FastS/FastS/BC/BCWallExchange_init.for
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
sampling = param_int(WM_SAMPLING)
sample = param_int(WM_SAMPLING)

exchange = 1 - sampling ! index correction for identifying the correct cell

sens_int = 1
shift = 0
if(mod(idir,2).eq.0) then
sens_int = -1
shift = 1
exchange = -exchange
endif

shiftvent = param_int(NIJK_VENT + idir/2)* exchange

if(idir.le.2) then
incijk=1
elseif(idir.le.4) then
incijk=param_int(NIJK)
else
incijk=param_int(NIJK+1)*param_int(NIJK)
endif
shift =incijk*shift

exchange =incijk*exchange
shift_loo= 2
2 changes: 1 addition & 1 deletion Fast/FastS/FastS/BC/BCWallModelRhs_j.for
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ldjr = inddm( ir , j, k )
ldjr = inddm( i , jr, k )


2 changes: 1 addition & 1 deletion Fast/FastS/FastS/BC/BCWallModelRhs_k.for
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ldjr = inddm( ir , j, k )
ldjr = inddm( i, j, kr )


4 changes: 1 addition & 3 deletions Fast/FastS/FastS/BC/BCWallModel_init.for
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

exchange = 1 - sampling ! index correction for identifying the correct cell

sens = 1.
sens_int = 1
shift = 0
if(mod(idir,2).eq.0) then
sens = -1.
sens_int = -1
shift = 1
exchange = -exchange
endif

shift =incijk*shift
shiftvent = param_int(NIJK_VENT + idir/2)* exchange

if(idir.le.2) then
Expand All @@ -22,6 +19,7 @@
else
incijk=param_int(NIJK+1)*param_int(NIJK)
endif
shift =incijk*shift

exchange =incijk*exchange
shift_loo= 2
2 changes: 2 additions & 0 deletions Fast/FastS/FastS/BC/BCWallViscous_transition.for
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
lambdaz_transi = 2.
ampli_transi = 0.0005

pi = 4*atan(1.)

if(zlong_transi.eq.0.0) then
zlong=abs( z( indcg(ind_loop(1),1, 1 ) )
& -z( indcg(ind_loop(1),1, param_int(IJKV+2)+1) ) )
Expand Down
19 changes: 15 additions & 4 deletions Fast/FastS/FastS/BC/bvbs_extrapolate.for
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ c***********************************************************************
C... Valeurs des grandeurs thermo imposees (insert1)

C Var local
INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,
INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int,
& njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund,
& ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk,
& iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax,
& ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp
& ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp,
& shift_loo,exchange, shift,shiftvent,incijk, sampling,
& loo,ltg,iadrf, mvent


REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz,
Expand All @@ -68,7 +70,8 @@ C Var local
& cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state,
& expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1,
& y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut,
& c0_2,coefa,coefb,coefc,mach,clund, amor
& c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext,
& cpinv,t1,utau2,tauw,e1,e2,e3, mu_w


#include "FastS/formule_param.h"
Expand All @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
& ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale)

c_ale = c_ale*mobile_coef
if(lrhs.eq.1) c_ale = 0.
c_pertu = 1.
if(lrhs.eq.1) then
c_ale = 0.
c_pertu = 0.
endif

snorm =-1.
if(mod(idir,2).eq.0) snorm = 1.
Expand All @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
rgp = param_real(CVINF)*gam1
cv = param_real( CVINF )
cvinv = 1./cv
cpinv = 1./(gam*cv)

prandlt = param_real( PRANDT )

cmus1 = param_real( CS )
Expand Down Expand Up @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
c3 = (2.- c5- c4)*c0
c7 = (c4-c5)*c0



C... Parametre specific a la CL(insert2)
#include "FastS/BC/BCExtrapolate_init.for"

Expand Down
19 changes: 15 additions & 4 deletions Fast/FastS/FastS/BC/bvbs_extrapolate_ransles.for
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ c***********************************************************************
C... Valeurs des grandeurs thermo imposees (insert1)

C Var local
INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,
INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int,
& njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund,
& ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk,
& iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax,
& ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp
& ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp,
& shift_loo,exchange, shift,shiftvent,incijk, sampling,
& loo,ltg,iadrf, mvent


REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz,
Expand All @@ -68,7 +70,8 @@ C Var local
& cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state,
& expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1,
& y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut,
& c0_2,coefa,coefb,coefc,mach,clund, amor
& c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext,
& cpinv,t1,utau2,tauw,e1,e2,e3, mu_w


#include "FastS/formule_param.h"
Expand All @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
& ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale)

c_ale = c_ale*mobile_coef
if(lrhs.eq.1) c_ale = 0.
c_pertu = 1.
if(lrhs.eq.1) then
c_ale = 0.
c_pertu = 0.
endif

snorm =-1.
if(mod(idir,2).eq.0) snorm = 1.
Expand All @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
rgp = param_real(CVINF)*gam1
cv = param_real( CVINF )
cvinv = 1./cv
cpinv = 1./(gam*cv)

prandlt = param_real( PRANDT )

cmus1 = param_real( CS )
Expand Down Expand Up @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
c3 = (2.- c5- c4)*c0
c7 = (c4-c5)*c0



C... Parametre specific a la CL(insert2)
#include "FastS/BC/BCExtrapolateRansLes_init.for"

Expand Down
22 changes: 15 additions & 7 deletions Fast/FastS/FastS/BC/bvbs_farfield.for
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ c***********************************************************************
C... Valeurs des grandeurs thermo imposees (insert1)

C Var local
INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,
INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int,
& njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund,
& ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk,
& iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax,
& ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp
& ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp,
& shift_loo,exchange, shift,shiftvent,incijk, sampling,
& loo,ltg,iadrf, mvent


REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz,
Expand All @@ -68,7 +70,8 @@ C Var local
& cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state,
& expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1,
& y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut,
& c0_2,coefa,coefb,coefc,mach,clund, amor
& c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext,
& cpinv,t1,utau2,tauw,e1,e2,e3, mu_w


#include "FastS/formule_param.h"
Expand All @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
& ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale)

c_ale = c_ale*mobile_coef
if(lrhs.eq.1) c_ale = 0.
c_pertu = 1.
if(lrhs.eq.1) then
c_ale = 0.
c_pertu = 0.
endif

snorm =-1.
if(mod(idir,2).eq.0) snorm = 1.
Expand All @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
rgp = param_real(CVINF)*gam1
cv = param_real( CVINF )
cvinv = 1./cv
cpinv = 1./(gam*cv)

prandlt = param_real( PRANDT )

cmus1 = param_real( CS )
Expand Down Expand Up @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
c3 = (2.- c5- c4)*c0
c7 = (c4-c5)*c0



C... Parametre specific a la CL(insert2)
#include "FastS/BC/BCFarfield_init.for"

Expand Down Expand Up @@ -315,7 +326,6 @@ C... Parametre specific a la CL(insert2)

else


do k = ind_loop(5), ind_loop(6)

j = ind_loop(3)
Expand All @@ -332,15 +342,13 @@ C... Parametre specific a la CL(insert2)
l = inddm( i, j , k )
ldp = indven( i, ind_loop(3) , k ) !next rank
lmtr = indmtr( i, ind_loop(3) , k ) !next rank

#include "FastS/BC/BC_nextrankSA_j.for"
enddo
enddo !j
enddo !k
endif !param_int(NEQ)



ELSEIF (idir.eq.5) THEN

kref = 2*ind_loop(6) + 1
Expand Down
22 changes: 16 additions & 6 deletions Fast/FastS/FastS/BC/bvbs_inflow.for
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ c***********************************************************************
C... Valeurs des grandeurs thermo imposees (insert1)

C Var local
INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,
INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int,
& njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund,
& ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk,
& iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax,
& ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp
& ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp,
& shift_loo,exchange, shift,shiftvent,incijk, sampling,
& loo,ltg,iadrf, mvent


REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz,
Expand All @@ -68,7 +70,8 @@ C Var local
& cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state,
& expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1,
& y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut,
& c0_2,coefa,coefb,coefc,mach,clund, amor
& c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext,
& cpinv,t1,utau2,tauw,e1,e2,e3, mu_w


#include "FastS/formule_param.h"
Expand All @@ -80,7 +83,7 @@ C Var local

c write(*,*)'idir=', idir,nijk(4),nijk(5),ndimdx
c write(*,*)'nijk=', nijk
c write(*,*)'loop inflow=', ind_loop
c write(*,*)'loop vis=', ind_loop


c......determine la forme des tableau metrique en fonction de la nature du domaine
Expand All @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
& ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale)

c_ale = c_ale*mobile_coef
if(lrhs.eq.1) c_ale = 0.
c_pertu = 1.
if(lrhs.eq.1) then
c_ale = 0.
c_pertu = 0.
endif

snorm =-1.
if(mod(idir,2).eq.0) snorm = 1.
Expand All @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
rgp = param_real(CVINF)*gam1
cv = param_real( CVINF )
cvinv = 1./cv
cpinv = 1./(gam*cv)

prandlt = param_real( PRANDT )

cmus1 = param_real( CS )
Expand Down Expand Up @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai
c3 = (2.- c5- c4)*c0
c7 = (c4-c5)*c0



C... Parametre specific a la CL(insert2)
#include "FastS/BC/BCInflow_init.for"

Expand All @@ -149,7 +160,6 @@ C... Parametre specific a la CL(insert2)

i = ind_loop(2)
l = inddm( i , j, k )

ldp = indven( ind_loop(2)+1 , j, k )
lmtr = indmtr( ind_loop(2)+1 , j, k )
#include "FastS/BC/BCInflow_i.for"
Expand Down
Loading

0 comments on commit 5cebd2f

Please sign in to comment.