('Fluent', 'OpenFOAM') : ('Fluent2CDM and CDM2OpenFoam'),
}
+#def prepareBlocSystemType(systemType) :
+# condition = "SystemType == '" + systemType + "'"
+ #Identifier = SIMP(statut='o', typ=(modeleNumDuCompo,'createObject'),)
+# ModelType = SIMP(statut='o', typ='TXM', into = ('Particles', 'Fields'),position='global')
+ #stl = SIMP (statut ='o', typ = simulatedTime)
+# dicoArgs={}
+
+# first=1
+# for typeMod in ( 'Fields', 'Particles'):
+# conditionType = "ModelType == '" + typeMod + "'"
+# NumericalMethod = SIMP(statut='o',typ='TXM', into=dictTypModNumModNum[systemType, typeMod],
+# position='global_jdc', intoXML=allValueInDict(dictTypModNumModNum))
+# if first :
+# blocNumMethod_1 = BLOC(condition =conditionType, NumericalMethod=NumericalMethod)
+# first=0
+# else :
+# blocNumMethod_2 = BLOC(condition =conditionType, NumericalMethod=NumericalMethod)
+ #blocMeshRef = BLOC(condition = 'ModelType == "Fields" and NumericalMethod == "FV"',
+ # Mesh_Identifiers = SIMP (statut ='o', max ='**', typ = meshIdentifier),)
+
+# dicoBloc = {}
+# for modeleNumerique in list(dictTypModNumModNum[systemType,typeMod]):
+# conditionNum = "NumericalMethod == '" + modeleNumerique + "'"
+# setCode = set()
+# for code in dictCodeModeleNumerique.keys():
+# if modeleNumerique in dictCodeModeleNumerique[code]: setCode.add(code)
+# Solver = SIMP(statut='o', typ='TXM', into=list(setCode), intoXML=list(dictCodeModeleNumerique.keys()) )
+# monNomBloc='b_ModelName_' + modeleNumerique.replace(' ','_')
+# if setCode !=set(): dicoBloc[monNomBloc]=BLOC(condition=conditionNum, nomXML='b_ModelName',Solver=Solver)
+# if setCode ==set(): print (condition, conditionNum)
+# #dicoArgs['b_modelType'+typeMod] = BLOC(condition=conditionType, NumericalMethod=NumericalMethod,**dicoBloc)
+# dicoArgs['b_modelType'+typeMod] = BLOC(condition=conditionType, **dicoBloc)
+# #NumericalModel = FACT(statut='o', max= '**', Identifier=Identifier, ModelType=ModelType,
+# NumericalModel = FACT(statut='o', max= '**', ModelType=ModelType,
+# blocNumMethod_1 = blocNumMethod_1, blocNumMethod_2 = blocNumMethod_2,
+# #blocMeshRef=blocMeshRef , Simulated_Time_Lapse=stl, **dicoArgs)
+# **dicoArgs)
+# return BLOC(condition=condition, nomXML='b_systemType', NumericalModel=NumericalModel)
+
def prepareBlocSystemType(systemType) :
- condition = "SystemType == '" + systemType + "'"
- Identifier = SIMP(statut='o', typ=(modeleNumDuCompo,'createObject'),)
- ModelType = SIMP(statut='o', typ='TXM', into = ('Particles', 'Fields'),position='global')
- stl = SIMP (statut ='o', typ = simulatedTime)
+ condition = "SystemType == '" + systemType + "'"
+ Identifier = SIMP(statut='o', typ=(modeleNumDuCompo,'createObject'),)
+ SimulatedTimeLapse = SIMP (statut ='o', typ = simulatedTime)
+ ModelType = SIMP(statut='o', typ='TXM', into = ('Particles', 'Fields'))
dicoArgs={}
- first=1
- for typeMod in ( 'Fields', 'Particles'):
- conditionType = "ModelType == '" + typeMod + "'"
+ for typeMod in ('Particles', 'Fields'):
+ conditionType = "ModelType == '" + typeMod + "'"
NumericalMethod = SIMP(statut='o',typ='TXM', into=dictTypModNumModNum[systemType, typeMod],
position='global_jdc', intoXML=allValueInDict(dictTypModNumModNum))
- if first :
- blocNumMethod_1 = BLOC(condition =conditionType, NumericalMethod=NumericalMethod)
- first=0
- else :
- blocNumMethod_2 = BLOC(condition =conditionType, NumericalMethod=NumericalMethod)
- blocMeshRef = BLOC(condition = 'ModelType == "Fields" and NumericalMethod == "FV"',
- Mesh_Identifiers = SIMP (statut ='o', max ='**', typ = meshIdentifier),)
-
dicoBloc = {}
for modeleNumerique in list(dictTypModNumModNum[systemType,typeMod]):
conditionNum = "NumericalMethod == '" + modeleNumerique + "'"
Solver = SIMP(statut='o', typ='TXM', into=list(setCode), intoXML=list(dictCodeModeleNumerique.keys()) )
monNomBloc='b_ModelName_' + modeleNumerique.replace(' ','_')
if setCode !=set(): dicoBloc[monNomBloc]=BLOC(condition=conditionNum, nomXML='b_ModelName',Solver=Solver)
- if setCode ==set(): print (condition, conditionNum)
- #dicoArgs['b_modelType'+typeMod] = BLOC(condition=conditionType, NumericalMethod=NumericalMethod,**dicoBloc)
- dicoArgs['b_modelType'+typeMod] = BLOC(condition=conditionType, **dicoBloc)
- NumericalModel = FACT(statut='o', max= '**', Identifier=Identifier, ModelType=ModelType,
- blocNumMethod_1 = blocNumMethod_1, blocNumMethod_2 = blocNumMethod_2,
- blocMeshRef=blocMeshRef , Simulated_Time_Lapse=stl, **dicoArgs)
+ dicoArgs['b_modelType'+typeMod] = BLOC(condition=conditionType, NumericalMethod=NumericalMethod,**dicoBloc)
+
+ blocMeshRef = BLOC(condition = 'ModelType == "Fields" and NumericalMethod == "FV"',
+ Mesh_Identifiers = SIMP (statut ='o', max ='**', typ = meshIdentifier),)
+ dicoArgs['blocMeshRef'] = blocMeshRef
+ NumericalModel = FACT(statut='o', max= '**', Identifier=Identifier, ModelType=ModelType,
+ SimulatedTimeLapse=SimulatedTimeLapse, **dicoArgs)
return BLOC(condition=condition, nomXML='b_systemType', NumericalModel=NumericalModel)
def calculCommun( key1, key2, dico):