Exemplo n.º 1
0
 def __init__(self, body, value):
     """
     The initial condition section may be used to set initial values
     
     - One or several bodies (object Support or StructuredMesh
       or list of)
     - The value is of type Displacement, temperature or chemical state
     """
     CommonInitialCondition.__init__(self, body, value)
     for val in value:
         memberShip(val,[Displacement, Temperature, ChemicalState])
     ok = 0
     for val in value:
         if val.__class__.__name__ == "ChemicalState":
             ok = 1
             self.chemicalState = val
             break
         pass
     if ok == 0: raise Warning(" the association of a chemical state to a boundary is mandatory ")
     ok = 0
     for val in value:
         if val.__class__.__name__ in ["Displacement","NormalForce"]:
             ok = 1
             self.value = val
             break
     if ok == 0: raise Warning(" check the definition of the initial condition linked to").with_traceback(body.bodyName)
     return None
Exemplo n.º 2
0
 def __init__(self, body, value):
     """Initial condition initialisation with
     - One or several bodies (object Support or StructuredMesh
       or list of)
     - The value is of type Head; eventually a Pressure or a SaturationLevel could be introduced: not the case for the moment.
       The value can be inserted as a function
     """
     CommonInitialCondition.__init__(self, body, value)
     return None
Exemplo n.º 3
0
 def __init__(self, body, value):
     """Initial condition initialisation with
     - One or several bodies (object Support or StructuredMesh
       or list of)
     - The value is of type Head; eventually a Pressure or a SaturationLevel could be introduced: not the case for the moment.
       The value can be inserted as a function
     """
     CommonInitialCondition.__init__(self, body, value)
     return None
 def __init__(self, zone, value):
     """Initial condition initialisation with
     - one or several zones (object Support or StructuredMesh
       or list of Support)
     - a value of type Head, Pressure or SaturationDegree
     """
     #from datamodel import Head,Pressure,SaturationDegree
     CommonInitialCondition.__init__(self,zone, value,[Head,Pressure,SaturationDegree])
     return
Exemplo n.º 5
0
 def __init__(self, zone, value):
     """Initial condition initialisation with
     - one or several zones (object Support or StructuredMesh
       or list of Support)
     - a value of type Head, Pressure or SaturationDegree
     """
     #from datamodel import Head,Pressure,SaturationDegree
     CommonInitialCondition.__init__(self, zone, value,
                                     [Head, Pressure, SaturationDegree])
     return
Exemplo n.º 6
0
 def __init__(self, body, value):
     """
     The initial condition section may be used to set initial values
     
     - One or several bodies (object Support or StructuredMesh
       or list of)
     - The value is of type Displacement
     """
     CommonInitialCondition.__init__(self, body, value)
     if not isinstance(value, Displacement) and not isinstance(
             value, Temperature):
         raise Warning("check the definition of the initial conditions")
     return None
Exemplo n.º 7
0
 def __init__(self, zone, value):
     """Initial condition initialisation with
     - one or several zones         - a value of type Pressure
     """
     from datamodel import Pressure
     CommonInitialCondition.__init__(self,zone, value,[Pressure])
Exemplo n.º 8
0
 def __init__(self, zone, value):
     """Initial condition initialisation with
     - one or several zones         - a value of type Pressure
     """
     from datamodel import Pressure
     CommonInitialCondition.__init__(self, zone, value, [Pressure])