[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:
Uwe
2023-03-20 04:28:45 +01:00
parent b496a41cd1
commit 866ea2551d
9 changed files with 623 additions and 175 deletions

View File

@@ -40,38 +40,79 @@ class ConstraintInitialFlowVelocity(base_fempythonobject.BaseFemPythonObject):
def __init__(self, obj):
super(ConstraintInitialFlowVelocity, self).__init__(obj)
obj.addProperty(
"App::PropertyFloat",
"App::PropertyVelocity",
"VelocityX",
"Parameter",
"Velocity in x-direction"
)
obj.addProperty(
"App::PropertyString",
"VelocityXFormula",
"Parameter",
"Velocity formula in x-direction"
)
obj.addProperty(
"App::PropertyBool",
"VelocityXEnabled",
"VelocityXUnspecified",
"Parameter",
"Use velocity in x-direction"
)
obj.VelocityXUnspecified = True
obj.addProperty(
"App::PropertyFloat",
"App::PropertyBool",
"VelocityXHasFormula",
"Parameter",
"Use formula for velocity in x-direction"
)
obj.addProperty(
"App::PropertyVelocity",
"VelocityY",
"Parameter",
"Velocity in y-direction"
)
obj.addProperty(
"App::PropertyString",
"VelocityYFormula",
"Parameter",
"Velocity formula in y-direction"
)
obj.addProperty(
"App::PropertyBool",
"VelocityYEnabled",
"VelocityYUnspecified",
"Parameter",
"Use velocity in y-direction"
)
obj.VelocityYUnspecified = True
obj.addProperty(
"App::PropertyFloat",
"App::PropertyBool",
"VelocityYHasFormula",
"Parameter",
"Use formula for velocity in y-direction"
)
obj.addProperty(
"App::PropertyVelocity",
"VelocityZ",
"Parameter",
"Velocity in z-direction"
)
obj.addProperty(
"App::PropertyString",
"VelocityZFormula",
"Parameter",
"Velocity formula in z-direction"
)
obj.addProperty(
"App::PropertyBool",
"VelocityZEnabled",
"VelocityZUnspecified",
"Parameter",
"Use velocity in z-direction"
)
obj.VelocityZUnspecified = True
obj.addProperty(
"App::PropertyBool",
"VelocityZHasFormula",
"Parameter",
"Use formula for velocity in z-direction"
)