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'),
),# 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"',
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'),
Surface=SIMP( statut='o', typ='TXM',max='**',),
) # fin Geometric_Domain
+
+
+