diff --git a/Cassiopee/CPlot/apps/tkIBC.py b/Cassiopee/CPlot/apps/tkIBC.py index 413fca9d6..5dbd03a21 100644 --- a/Cassiopee/CPlot/apps/tkIBC.py +++ b/Cassiopee/CPlot/apps/tkIBC.py @@ -316,7 +316,7 @@ def createApp(win): B = TTK.Label(Frame, text="IBC type") B.grid(row=2, column=0, sticky=TK.EW) BB = CTK.infoBulle(parent=B, text='Type of Immersed Boundary Condition.') - B = TTK.OptionMenu(Frame, VARS[1], 'slip', 'noslip', 'Log', 'Musker', 'WallLaw', 'outpress', 'inj', 'TBLE', 'slip_cr', 'overlap','wiremodel','WallLawLinearized','None') + B = TTK.OptionMenu(Frame, VARS[1], 'slip', 'noslip', 'Log', 'Musker', 'SA', 'outpress', 'inj', 'TBLE', 'slip_cr', 'overlap','wiremodel','MuskerLinear','SALinear','None') B.grid(row=2, column=1, columnspan=2, sticky=TK.EW) # - Mask settings (in or out) - diff --git a/Cassiopee/Connector/Connector/IBC/setIBCTransfers.cpp b/Cassiopee/Connector/Connector/IBC/setIBCTransfers.cpp index 9db540111..455c0e2d6 100644 --- a/Cassiopee/Connector/Connector/IBC/setIBCTransfers.cpp +++ b/Cassiopee/Connector/Connector/IBC/setIBCTransfers.cpp @@ -501,7 +501,7 @@ E_Int K_CONNECTOR::setIBCTransfersCommonVar2( E_Float R_gas = Pinf/(Roinf*Tinf); - + E_Int bctypeLocal; int motionType = (int) param_real[MotionType]; //[AJ] Keep for now //E_Float transpeed[3] = {param_real[TransSpeed],param_real[TransSpeed+1],param_real[TransSpeed+2]}; @@ -572,6 +572,15 @@ E_Int K_CONNECTOR::setIBCTransfersCommonVar2( E_Float* alphasbeta_linePtr = NULL; E_Float* index_linePtr = NULL; + // bctype = 3 for all Musker, SA, MuskerLin, & SALin to avoid adding + // more bctype conditions in if statements. + // bctypeLocal will be kept for a flag switch for SA (32), MuskerLin (331), & SALin (332). + // These are in development and will be added in the near future. + bctypeLocal = bctype; + if ( bctypeLocal == 32 || bctypeLocal == 331 || bctypeLocal == 332){ + bctype=3; + } + if (motionType==3){ E_Int shift_var=0; // log, Musker, TBLE, MuskerMob, Pohlhausen, Thwaites - also have utau & yplus - need the shift diff --git a/Cassiopee/Connector/Connector/OversetData.py b/Cassiopee/Connector/Connector/OversetData.py index d1994218b..c7d77d224 100644 --- a/Cassiopee/Connector/Connector/OversetData.py +++ b/Cassiopee/Connector/Connector/OversetData.py @@ -22,8 +22,8 @@ TypesOfIBC["slip"]=0 TypesOfIBC["noslip"]=1 TypesOfIBC["Log"]=2 -TypesOfIBC["Musker"]=3 -TypesOfIBC["WallLaw"]=3 +TypesOfIBC["Musker"]=3 #also 31 +TypesOfIBC["SA"]=32 TypesOfIBC["outpress"]=4 TypesOfIBC["inj"]=5 TypesOfIBC["TBLE"]=6 @@ -35,7 +35,8 @@ TypesOfIBC["isothermal"]=12 #isothermal: set T_wall TypesOfIBC["heatflux"]=13 #heatflux: set q_wall TypesOfIBC["overlap"]=14 #TBLE+gradP+conv+SA -TypesOfIBC["WallLawLinearized"]=33 +TypesOfIBC["MuskerLinear"]=331 +TypesOfIBC["SALinear"]=332 TypesOfIBC["wiremodel"]=140 #wire mesh model # Variables IBM pour le post traitement diff --git a/Cassiopee/Connector/Connector/compactTransfers.py b/Cassiopee/Connector/Connector/compactTransfers.py index ce43e5577..9bf1ef1be 100644 --- a/Cassiopee/Connector/Connector/compactTransfers.py +++ b/Cassiopee/Connector/Connector/compactTransfers.py @@ -560,7 +560,7 @@ def miseAPlatDonorTree__(zones, tc, graph=None, list_graph=None, nbpts_linelets= if sname == 'IB': zsrname = zsrname.split('_') if len(zsrname) < 3: - #print('Warning: miseAPlatDonorTree: non consistent with the version of IBM preprocessing.') + #print('Warning: miseAPlatDonorTree: non consistent with the version of IBM preprocessing.') if model=='Euler': print('Assuming IBC type is wallslip.') param_int[iadr+rac[pos]*3] = 0 diff --git a/Cassiopee/Generator/test/checkCartesian_m1.py b/Cassiopee/Generator/test/checkCartesian_m1.py index bb718a11c..cbaa82b42 100644 --- a/Cassiopee/Generator/test/checkCartesian_m1.py +++ b/Cassiopee/Generator/test/checkCartesian_m1.py @@ -7,7 +7,9 @@ import Generator.IBM as G_IBM import Distributor2.PyTree as D2 import Converter.Mpi as Cmpi -import random +import os + +LOCAL = test.getLocal() if Cmpi.rank==0: a = G.cart((0.,0.,0.), (0.1,0.1,1), (40,40,40)) @@ -16,8 +18,8 @@ t = T.splitNParts(t, 10) t,stats = D2.distribute(t, 2) - C.convertPyTree2File(t,'t_TMP.cgns') -t=Cmpi.convertFile2PyTree('t_TMP.cgns',proc=Cmpi.rank) + C.convertPyTree2File(t,LOCAL+'/t_TMP.cgns') +t=Cmpi.convertFile2PyTree(LOCAL+'/t_TMP.cgns',proc=Cmpi.rank) ##Test 1 - Cartesian cartesian=G_IBM.checkCartesian(t) @@ -77,3 +79,7 @@ test.testT(t,4) print('Is Cartesian::',cartesian,isCartesian) #C.convertPyTree2File(t,'t_test4.cgns') + +del t +del tsave +if Cmpi.rank==0: os.remove(LOCAL+'/t_TMP.cgns')