12
12
'gradxVelocityX' ,'gradyVelocityX' ,'gradzVelocityX' ,
13
13
'gradxVelocityY' ,'gradyVelocityY' ,'gradzVelocityY' ,
14
14
'gradxVelocityZ' ,'gradyVelocityZ' ,'gradzVelocityZ' ,
15
- 'KCurv' ,'yplus' ]
15
+ 'KCurv' ,'yplus' ,
16
+ 't11_model' ,'t12_model' ,'t22_model' ,
17
+ 't13_model' ,'t23_model' ,'t33_model' ]
18
+ varsDeleteIBMRotTmp = ['CoordinateX_PC#Init' ,'CoordinateX_PC#Init' ,'CoordinateX_PC#Init' ,
19
+ 'CoordinateX_PW#Init' ,'CoordinateX_PW#Init' ,'CoordinateX_PW#Init' ,
20
+ 'CoordinateX_PI#Init' ,'CoordinateX_PI#Init' ,'CoordinateX_PI#Init' ,
21
+ 'MotionType' ,'omega' ,
22
+ 'transl_speedX' ,'transl_speedY' ,'transl_speedZ' ,
23
+ 'axis_pntX' ,'axis_pntY' ,'axis_pntZ' ,
24
+ 'axis_vctX' ,'axis_vctY' ,'axis_vctZ' ]
16
25
#==============================================================================
17
26
# Creation of a case with a symmetry plane
18
27
#==============================================================================
@@ -423,11 +432,18 @@ def _initInj(tc, familyName, PTot, HTot, injDir=[1.,0.,0.], InterpolPlane=None,
423
432
#==============================================================================
424
433
# Add variables to the IBC
425
434
#==============================================================================
426
- def _addVariablesTcIbc (zsr , ibctype , nIBC ):
435
+ def _addVariablesTcIbc (zsr , ibctype , nIBC , nsModel = 'NSLaminar' ):
427
436
Nlength = numpy .zeros ((nIBC ),numpy .float64 )
428
- if ibctype in [2 , 3 , 6 , 10 , 11 ]:
437
+ if ibctype in [2 , 3 , 6 , 10 , 11 , 31 , 32 , 331 , 332 ]:
429
438
zsr [2 ].append (['utau' , copy .copy (Nlength ), [], 'DataArray_t' ])
430
439
zsr [2 ].append (['yplus' , copy .copy (Nlength ), [], 'DataArray_t' ])
440
+ if ibctype in [331 , 332 ] and nsModel == 'NSLaminar' :
441
+ zsr [2 ].append (['t11_model' , copy .copy (Nlength ), [], 'DataArray_t' ])
442
+ zsr [2 ].append (['t12_model' , copy .copy (Nlength ), [], 'DataArray_t' ])
443
+ zsr [2 ].append (['t22_model' , copy .copy (Nlength ), [], 'DataArray_t' ])
444
+ zsr [2 ].append (['t13_model' , copy .copy (Nlength ), [], 'DataArray_t' ])
445
+ zsr [2 ].append (['t23_model' , copy .copy (Nlength ), [], 'DataArray_t' ])
446
+ zsr [2 ].append (['t33_model' , copy .copy (Nlength ), [], 'DataArray_t' ])
431
447
432
448
if ibctype == 5 :
433
449
Internal ._createChild (zsr , 'StagnationEnthalpy' , 'DataArray_t' , value = copy .copy (Nlength ))
@@ -474,6 +490,9 @@ def _changeIBCType(tc, oldIBCType, newIBCType):
474
490
"""Change the IBC type in a connectivity tree from oldIBCType to newIBCType.
475
491
Usage: changeIBCType(tc, oldIBCType, newIBCType)"""
476
492
for z in Internal .getZones (tc ):
493
+ govEqn = Internal .getNodeFromName (z , 'GoverningEquations' )
494
+ nsModel = 'NSLaminar'
495
+ if govEqn : nsModel = Internal .getValue (govEqn )
477
496
subRegions = Internal .getNodesFromType1 (z , 'ZoneSubRegion_t' )
478
497
for zsr in subRegions :
479
498
nameSubRegion = zsr [0 ]
@@ -487,7 +506,7 @@ def _changeIBCType(tc, oldIBCType, newIBCType):
487
506
for var_local in varsDeleteIBM :
488
507
Internal ._rmNodesByName (zsr , var_local )
489
508
490
- _addVariablesTcIbc (zsr , newIBCType , nIBC )
509
+ _addVariablesTcIbc (zsr , newIBCType , nIBC , nsModel )
491
510
492
511
return None
493
512
0 commit comments