From: pascale.noyret Date: Mon, 22 Jun 2020 16:13:53 +0000 (+0200) Subject: suite2 X-Git-Tag: Merge_V9_6~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f8ccda6e776ba0538d7d16741406f23d7c8aa4a8;p=tools%2Feficas.git suite2 --- diff --git a/Vimmp/cata_CSAndCPS.py b/Vimmp/cata_CSAndCPS.py index b6999410..713d532f 100755 --- a/Vimmp/cata_CSAndCPS.py +++ b/Vimmp/cata_CSAndCPS.py @@ -5,6 +5,11 @@ class composant(ASSD):pass class geometricDomain(ASSD):pass class modeleNumDuCompo(UserASSD):pass class especeChimique(UserASSD):pass +class userParticle(UserASSD) :pass +class userAtom(userParticle) :pass +class userMolecule(userParticle) :pass +class userDiscrete(userParticle) :pass +class userDPD(userParticle) :pass dictSystemTypeModeleNumerique = { 'Quantum system' : (), 'Classical partical system' : ('MD', 'DPD', 'LBM', 'SDPD','SPH','CFD_Discrete_Particles'), @@ -152,6 +157,74 @@ def FactTurbulence(statut): ),# fin bloc_N_particle ), # fin bloc_no_model )# fin du bloc return de la fonction factTurbulence +def Particle(cardinalite) : + return FACT (statut='o', max=cardinalite, + ParticleNature = SIMP( statut='o', typ='TXM', into=['Atoms', 'Molecules', 'Dissipative', 'Fluid Particle', 'Discrete Particle']), + b_Atom = BLOC( condition='ParticleNature == "Atoms"', + AtomsName = SIMP( statut='o', typ=(userAtom,'createObject'),), + Atom = FACT (statut ='o', max= '**', + ChemicalSpecie = SIMP( statut='o', typ='TXM'), + Number = SIMP (statut ='o', typ = 'I'), + ElectricCharge = SIMP( statut='o', typ='R'), + MagneticMoment = SIMP( statut='o', typ='R'), + Size = SIMP( statut='f', typ='R'), # relevant ? + ), + ), + b_Molecule = BLOC( condition='ParticleNature == "Molecule"', + MoleculeName = SIMP( statut='o', typ=(userParticle,'createObject'),), + ChemicalSpecie = FACT ( max='**', statut='o', + ChemicalSpecieName = SIMP( statut='o', typ=userAtom), + Proportion = SIMP( statut='o', typ='R', val_max =1), + ), + ElectricCharge = SIMP( statut='o', typ='R'), + MagneticMoment = SIMP( statut='o', typ='R'), + Shape = SIMP( statut='f', typ='TXM', into=['Linear', 'Trigonal Planar', 'Angular', 'Tetrahedral', 'Octahedral', 'Trigonal pyramid', 'Other']), + ), + b_Dissipative = BLOC( condition='ParticleNature == "Dissipative"', + DPDName = SIMP( statut='o', typ=(userDPD,'createObject'),), + BondedParticles = SIMP(statut="o", typ=bool, defaut='False'), + ), + b_Discrete = BLOC( condition='ParticleNature == "Discrete Particle"', + DiscreteParticleName = SIMP(statut='o', typ=(userDiscrete,'createObject'),), + TypeOfDiscreteParticle = SIMP( statut='o', typ='TXM', into=['Solid', 'Droplets', 'Bubbles','Bio Organism'],), + b_TypeDP_Solid = BLOC( condition ='TypeOfDiscreteParticle == "Solid"', + TypeOfSolid = SIMP( statut='o', typ='TXM', into=['Primary Particle', 'Aggregate'], position = 'global_jdc'), + b_SolidPrimary = BLOC( condition='TypeOfSolid == "Primary Particle"', + ), + b_SolidAggregate = BLOC( condition='TypeOfSolid == "Aggregate"', + ), + ), + b_TypeBio_Solid = BLOC( condition='TypeOfDiscreteParticle == "Bio Organism"', + TypeOfOrganism = SIMP( statut='o', typ='TXM', into=['Unicellular', 'Multicellar']), + b_Unicellular = BLOC( condition ='TypeOfOrganism=="Unicellular"', + Unicellular = SIMP( statut='o', typ='TXM', into=["Bactaria"], defaut='Bacteria') + ), + b_Multicellular = BLOC( condition ='TypeOfOrganism=="Multicellular"', + Multicellular = SIMP( statut='o', typ='TXM', into=["Animal","Fongus","Plant"]) + ), + ), # b_TypeBio_Solid + Properties = FACT ( statut ='o', + Geometry = SIMP( statut='o', typ='TXM', into=['Sphere', 'Ellopsoids', 'Other Shape']), + Mechanical = SIMP( statut='o', typ='TXM', into=['Rigid', 'Flexible', 'Deformable']), + b_SolidAggregate = BLOC( condition='TypeOfSolid == "Aggregate"', + Morphological = FACT (statut = 'o', + Consigne = SIMP(statut="o", homo="information", typ="TXM", defaut='Choose optional properties'), + FractalDimension = SIMP( statut='f', typ='R'), + PrimaryParticlesNumber = SIMP (statut ='f',typ='I'), + EquivalentSize = SIMP( statut='f', typ='R'), + Porosoty = SIMP( statut='f', typ='R'), + ), # Morphological + ), # b_SolidAggregate + ), # Properties + ), # b_Discrete + ) + +def bloc_CPS(): + return BLOC(condition = 'SystemType == "Classical partical system"', + PhysicalDescription = FACT (statut ='o', + Particle = Particle('**'), + ) +) def bloc_FluideMacro(): return BLOC(condition = 'SystemType == "Continuum system"', @@ -217,6 +290,7 @@ JdC = JDC_CATA ( Component = OPER(nom='Component', sd_prod=composant, SystemType = SIMP(typ='TXM', into=['Quantum system', 'Classical partical system', 'Continuum system'], statut='o'), b_FluideMacro = bloc_FluideMacro(), + b_bloc_CPS = bloc_CPS(), b_ModeleNumerique_quantum = prepareBlocSystemType('Quantum system'), b_ModeleNumerique_classical = prepareBlocSystemType('Classical partical system'), b_ModeleNumerique_continuum = prepareBlocSystemType('Continuum system'), @@ -355,3 +429,6 @@ Geometric_Domain= OPER( nom='Geometric_Domain', sd_prod=geometricDomain, Surface=SIMP( statut='o', typ='TXM',max='**',), ) # fin Geometric_Domain + + +