From: pascale.noyret Date: Tue, 1 Dec 2020 16:55:54 +0000 (+0100) Subject: ajout des variables dynamiques X-Git-Tag: V210224_osthus~74^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=940852d55168a67e84bb4161a25f335fe6e6b699;p=tools%2Feficas.git ajout des variables dynamiques --- diff --git a/Vimmp/cata_CSAndCPS_v6.py b/Vimmp/cata_CSAndCPS_v6.py index a93069df..7bc46e69 100644 --- a/Vimmp/cata_CSAndCPS_v6.py +++ b/Vimmp/cata_CSAndCPS_v6.py @@ -20,7 +20,9 @@ class systemGeometry(UserASSD):pass class simulatedTime(UserASSD):pass class constitutiveRelation(UserASSD):pass -class scalar(UserASSD):pass +class boundaryObject(UserASSD) : pass +class scalar(boundaryObject):pass +class dynamicVariable(boundaryObject):pass #dictSystemTypeModeleNumerique = { 'Quantum system' : (), @@ -485,6 +487,15 @@ def bloc_FluideMacro(): ), bloc_NonEOSAndSimple=BLOC( condition = 'RelationType == "Force-Flux Relation" and ComplexFluid == False', TypeOfForceFluxRelation = SIMP( statut='o', into =['Viscosity', 'Diffusivity', 'Thermal Conductivity'], intoXML=['Viscosity', 'Diffusivity', 'Thermal Conductivity','Shear-stress closure', 'Scalar flux'], typ ='TXM'), + blocViscosity=BLOC( condition = 'TypeOfForceFluxRelation == "Viscosity"', + AFAIRE=SIMP(typ='TXM', statut = 'o', defaut = 'Initialisation ?') + ), + blocDiffusivity=BLOC( condition = 'TypeOfForceFluxRelation == "Diffusivity"', + AFAIRE=SIMP(typ='TXM', statut ='o', defaut = 'Initialisation ?') + ), + blocConductivity=BLOC( condition = 'TypeOfForceFluxRelation == "Thermal Conductivity"', + AFAIRE=SIMP(typ='TXM', statut ='o', defaut = 'Initialisation ?') + ), ), bloc_NonEOSAndComplex=BLOC( condition = 'RelationType == "Force-Flux Relation" and ComplexFluid == True', TypeOfForceFluxRelation = SIMP( statut='o', into =['Shear-stress closure', 'Scalar flux'], typ ='TXM', intoXML=['Viscosity', 'Diffusivity', 'Thermal Conductivity','Shear-stress closure', 'Scalar flux']), @@ -542,13 +553,8 @@ def bloc_FluideMacro(): #-----------------------------------------------------# def prepareBoundaryCondition(): - return FACT( statut='f',max = '**', # max = nb de facette de bord - Apply_to_Wich_Quantity = SIMP( statut='o', typ='TXM', into=['Mass FLux', 'Scalars']), - applyOnEssai2 = SIMP (statut ='o', typ=scalar, ), - - b_on_scalar=BLOC(condition='Apply_to_Wich_Quantity == "Scalars"', - applyOn = SIMP (statut ='o', typ=scalar, ), - + return FACT( statut='o',max = '**', # max = nb de facette de bord + applyOnEssai = SIMP (statut ='o', typ=boundaryObject, ), Type_Of_Boundary_Condition = SIMP( statut='o', typ='TXM', into=['Inlet', 'Outlet', 'Symmetry','Periodicity', 'Wall', 'Free Surface'], ), b_periodique = BLOC( condition = "Type_Of_Boundary_Condition == 'Periodic'", Direction = SIMP( statut='o', typ='TXM', into=['X','Y','Z', 'XYZ']), @@ -561,22 +567,21 @@ def prepareBoundaryCondition(): IntegratedValue = SIMP ( statut='o', typ='R'), #PN : faire une regle ), + ), # b_inlet # b_Formulation_of_Boundary_Neumann = BLOC( condition = 'Formulation_of_Boundary == "Neumann"', # ), # b_Formulation_of_Boundary_Cauchy = BLOC( condition = 'Formulation_of_Boundary == "Cauchy"', # ), -# ), # b_inOrOutlet # #b_non_periodique = BLOC( condition = "Type_Of_Boundary_Condition != 'Periodic'", # # Boundary_Face = SIMP( statut='o', typ= spatialRegion), # #Apply_to_Wich_Quantity = SIMP( statut='o', typ='TXM', into=['Mass FLux', 'Velocity', 'Temperature','Scalars','all',]), - ), +# ), # Formulation_of_Boundary= SIMP( statut='o', typ='TXM', into=['Dirichlet','Neumann']), # b_Formulation_of_Boundary_dirichlet = BLOC( condition = 'Formulation_of_Boundary == "Dirichlet"', # Value = SIMP ( statut='o', typ='R'), # ), - ), # b_non_periodique ) # Boundary_Conditions @@ -596,7 +601,19 @@ Component = OPER(nom='Component', sd_prod=composant, b_ModeleNumerique_quantum = prepareBlocSystemType('Quantum system'), b_ModeleNumerique_classical = prepareBlocSystemType('Classical particle system'), b_ModeleNumerique_continuum = prepareBlocSystemType('Continuum system'), - BoundaryConditions = prepareBoundaryCondition(), + BoundaryConditions = FACT(statut = 'o', + DynamicalVariables = FACT (statut ='o', + BFlowNatureLaminar=BLOC(condition ='FlowNature == "Laminar"', + Fluid_Velocity = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='Fluid_Velocity', homo='constant'), + Fluid_Pressure = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='Fluid_Pressure', homo='constant'), + ), + BFlowNatureTurbulent=BLOC(condition ='FlowNature == "Turbulent"', + Avarage_Velocity = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='Fluid_Velocity', homo='constant'), + Fluid_Pressure = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='Fluid_Pressure', homo='constant'), + ), + ), + BoundaryCondition = prepareBoundaryCondition(), + ) ) Species = PROC(nom='Species',