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
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
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
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
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])
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])