[FEM] rewrite initial velocity constraint
- same as #8963 but for initial velocity - add an example file that demonstrates the influence of the initial velocity - some fine-tuning for the existing flow example
This commit is contained in:
@@ -193,14 +193,23 @@ class Flowwriter:
|
||||
def _outputInitialVelocity(self, obj, name):
|
||||
# flow only makes sense for fluid material
|
||||
if self.write.isBodyMaterialFluid(name):
|
||||
if obj.VelocityXEnabled:
|
||||
velocity = self.write.getFromUi(obj.VelocityX, "m/s", "L/T")
|
||||
if not obj.VelocityXUnspecified:
|
||||
if not obj.VelocityXHasFormula:
|
||||
velocity = float(obj.VelocityX.getValueAs("m/s"))
|
||||
else:
|
||||
velocity = obj.VelocityXFormula
|
||||
self.write.initial(name, "Velocity 1", velocity)
|
||||
if obj.VelocityYEnabled:
|
||||
velocity = self.write.getFromUi(obj.VelocityY, "m/s", "L/T")
|
||||
if not obj.VelocityYUnspecified:
|
||||
if not obj.VelocityYHasFormula:
|
||||
velocity = float(obj.VelocityY.getValueAs("m/s"))
|
||||
else:
|
||||
velocity = obj.VelocityYFormula
|
||||
self.write.initial(name, "Velocity 2", velocity)
|
||||
if obj.VelocityZEnabled:
|
||||
velocity = self.write.getFromUi(obj.VelocityZ, "m/s", "L/T")
|
||||
if not obj.VelocityZUnspecified:
|
||||
if not obj.VelocityZHasFormula:
|
||||
velocity = float(obj.VelocityZ.getValueAs("m/s"))
|
||||
else:
|
||||
velocity = obj.VelocityZFormula
|
||||
self.write.initial(name, "Velocity 3", velocity)
|
||||
|
||||
def handleFlowInitialVelocity(self, bodies):
|
||||
|
||||
Reference in New Issue
Block a user