ParticleMass = FACT(statut ='o',
Mass = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='Mass', homo='constant'),
ToSimulate = SIMP(typ=bool, statut ='o', defaut = True,),
- blocSimulatedMass = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible ='Not needed'),
+ blocSimulatedMass = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible ='Not needed',particle=True),
#blocNoSimulatedMass = prepareBlocOrigine(condition = 'ToSimulate == False'),
),
ParticlePosition = FACT(statut ='o',
Position = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='Position', homo='constant'),
ToSimulate = SIMP(typ=bool, statut ='o', defaut = True,),
- blocSimulatedPosition = prepareBlocInitialisationSansTermeSource(condition = 'ToSimulate == True', ajoutPossible='Not needed'),
+ blocSimulatedPosition = prepareBlocInitialisationSansTermeSource(condition = 'ToSimulate == True', ajoutPossible='Not needed', particle=True),
blocNoSimulatedPosition = prepareBlocOrigine(condition = 'ToSimulate == False'),
),
blocNoBrownianDynamics = BLOC(condition = '(TypeOfConstraint != None) and not("Brownian dynamics" in TypeOfConstraint)',
ParticleVelocity = FACT(statut ='o',
Velocity = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='Velocity', homo='constant'),
ToSimulate = SIMP(typ=bool, statut ='o', defaut = True,),
- blocSimulatedVelocity = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible='Not needed'),
+ blocSimulatedVelocity = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible='Not needed',particle=True),
blocNotSimulatedVelocity = prepareBlocOrigine(condition = 'ToSimulate == False',),
), #fin VelocityDefinition
blocHydrodynamic = BLOC(condition = '"Hydrodynamic" in MomentumFieldType',
FluidVelocitySeenByParticles = FACT(statut ='o',
FluidSeenVelocity = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='FluidSeenVelocity', homo='constant'),
ToSimulate = SIMP(typ=bool, statut ='o', defaut = True,),
- blocHydrodynamicVelocity = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible='Not needed'),
+ blocHydrodynamicVelocity = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible='Not needed',particle=True),
blocNotHydrodynamicVelocity = prepareBlocOrigine(condition = 'ToSimulate == False',),
) ,
) ,
),
),
)
-# _______________________________________
-def prepareBlocInitialisation(condition,ajoutPossible=None):
-# _______________________________________
+# __________________________________________________________________
+def prepareBlocInitialisation(condition,ajoutPossible=None,particle=False):
+# __________________________________________________________________
monIntoType = ['ByValue', 'ByFile', 'ByInteraction']
+ dicoParticle = {}
+ if particle : dicoParticle['ParticleIdentifier']=SIMP(statut='o', typ = userParticle)
if ajoutPossible != None :
monIntoType.append(ajoutPossible)
return BLOC(condition = condition,
Initialisation = FACT(statut ='o',
+ **dicoParticle,
InitialisationType = SIMP(statut='o', into = monIntoType, typ ='TXM', defaut='ByValue'),
blocByFile = creeBlocPourLesFichiers('InitialisationType == "ByFile"', '', ListeFormats = listeFormatGenerique, FieldName='FieldName'),
blocByInteraction = BLOC(condition = 'InitialisationType == "ByInteraction"',
blocSourceTerm = prepareTermeSourceDynVar('SourceTerm==True'),
) #blocSimulatedPressure
-def prepareBlocInitialisationSansTermeSource(condition,ajoutPossible=None):
+def prepareBlocInitialisationSansTermeSource(condition,ajoutPossible=None, particle=True):
monIntoType = ['ByValue', 'ByFile', 'ByInteraction']
if ajoutPossible != None :
monIntoType.append(ajoutPossible)
return BLOC(condition = condition,
Initialisation = FACT(statut ='o',
+ ParticleIdentifier=SIMP(statut='o', typ = userParticle),
InitialisationType = SIMP(statut='o', into =monIntoType, typ ='TXM', defaut='ByValue'),
blocByFile = creeBlocPourLesFichiers('InitialisationType == "ByFile"', '', ListeFormats = listeFormatGenerique, FieldName='FieldName'),
blocByInteraction = BLOC(condition = 'InitialisationType == "ByInteraction"',