From: pascale.noyret Date: Mon, 30 Nov 2020 13:56:04 +0000 (+0100) Subject: thermal suite X-Git-Tag: V210224_osthus~83^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=34fdd685da745c622db0e38e29fd460eaf48c182;p=tools%2Feficas.git thermal suite --- diff --git a/Vimmp/cata_CSAndCPS_v5.py b/Vimmp/cata_CSAndCPS_v5.py index 65fbf727..36ce45a9 100644 --- a/Vimmp/cata_CSAndCPS_v5.py +++ b/Vimmp/cata_CSAndCPS_v5.py @@ -140,7 +140,7 @@ def allValueInDict( dico): for val in dico[clef] : monSet.add(val) return monSet -def creeBlocPourLesFichiers (laCondition, NomDuFichier, ListeFormats): +def creeBlocPourLesFichiers (laCondition, NomDuFichier, ListeFormats, FieldName=False): SIMPFormatFichier = SIMP(statut='o', typ = 'TXM', into = tuple(ListeFormats) + ('others',), ) dicoDesBlocs = {} for formatFich in ListeFormats : @@ -149,7 +149,11 @@ def creeBlocPourLesFichiers (laCondition, NomDuFichier, ListeFormats): blocCondition ="FileFormat == '" + formatFich + "'" dicoDesBlocs[nomBloc] = BLOC( condition = blocCondition, FileName = SIMP(statut='o', typ = typeDesFichiers ),) dicoDesBlocs['b_format_fichier_others'] = BLOC(condition="FileFormat == 'others'", FileName = SIMP(statut='o', typ = ('Fichier','All Files (*)'),),) - return BLOC(condition=laCondition, FileFormat = SIMPFormatFichier, **dicoDesBlocs) + if FieldName: + SIMPFieldName = SIMP(statut='o', typ = 'TXM',) + return BLOC(condition=laCondition, FileFormat = SIMPFormatFichier, **dicoDesBlocs, FieldName=SIMPFieldName) + else : + return BLOC(condition=laCondition, FileFormat = SIMPFormatFichier, **dicoDesBlocs) def champ(nomDelaContante, labels ,nbReels ) : # ajouter les extensions pour le fichier et les blocs associes @@ -462,10 +466,9 @@ def bloc_FluideMacro(): ), # fin bloc_NonThermal bloc_ThermalEffects_Passive = BLOC(condition =' ThermalEffects == "Passive on flow dynamics"', - ThermalFluxModel = FACT('o', + ThermalFluxModel = FACT(statut = 'o', NatureOfThermalFluxModel = SIMP( statut='o', into =['Given', 'Simulated'], typ ='TXM'), - BlocGiven =creeBlocPourLesFichiers (' NatureOfThermalFluxModel == "Given"', None, ('Med', 'cgns' ), - ), + BlocGiven =creeBlocPourLesFichiers (' NatureOfThermalFluxModel == "Given"', None, ('Med', 'cgns' ), FieldName=1), ), ), # fin bloc_ThermalEffects_Passive @@ -477,12 +480,6 @@ def bloc_FluideMacro(): ), # fin bloc_NonThermalEffectsAndNoEffect - bloc_ThermalEffects = BLOC(condition = ' ThermalEffects == "Active on flow dynamics" or ThermalEffects == "Passive on flow dynamics"', - bloc_scalar_thermal_flux = BLOC (condition = "FlowNature == 'Turbulent'", - ThermalFluxModel = FactTurbulence('f'), - ),# fin bloc_scalar_thermal_flux - WithChemicalReactions = SIMP(typ=bool, statut ='o', defaut = False), - ), # fin bloc_ThermalEffects ),# fin Fact Thermal # ---------------------- Effets thermiques