diff --git a/docker/pre/README.rst b/docker/pre/README.rst index de641e457..1e9334ed5 100644 --- a/docker/pre/README.rst +++ b/docker/pre/README.rst @@ -25,7 +25,7 @@ Prerequisites instructions from `this page `_. * Download the latest Linux release artifacts for the ``pre`` Docker container: - `linux-binaries.zip `_. + `linux-binaries.zip `_. * Move this ZIP file to the ``docker/pre`` directory. diff --git a/src/ansys/dyna/core/pre/dynabase.py b/src/ansys/dyna/core/pre/dynabase.py index c97c8ad53..55dca7f4a 100644 --- a/src/ansys/dyna/core/pre/dynabase.py +++ b/src/ansys/dyna/core/pre/dynabase.py @@ -20,6 +20,11 @@ class Motion(Enum): DISPLACEMENT = 2 +class RWMotion(Enum): + VELOCITY = 0 + DISPLACEMENT = 1 + + class DOF(Enum): X_TRANSLATIONAL = 1 Y_TRANSLATIONAL = 2 @@ -2528,13 +2533,11 @@ def __init__(self, tail=Point(0, 0, 0), head=Point(0, 0, 0), radius=1, length=10 self.lcid = 0 self.dir = Direction(1, 0, 0) - def set_motion(self, curve, motion=Motion.VELOCITY, dir=Direction(1, 0, 0)): + def set_motion(self, curve, motion=RWMotion.VELOCITY, dir=Direction(1, 0, 0)): """Set the prescribed motion.""" curve.create(self.stub) self.lcid = curve.id self.motion = motion.value - if self.motion == Motion.DISPLACEMENT: - self.motion = 1 self.dir = dir def create(self): @@ -2589,13 +2592,11 @@ def __init__(self, center=Point(0, 0, 0), orient=Point(0, 0, 0), radius=1): self.lcid = 0 self.dir = Direction(1, 0, 0) - def set_motion(self, curve, motion=Motion.VELOCITY, dir=Direction(1, 0, 0)): + def set_motion(self, curve, motion=RWMotion.VELOCITY, dir=Direction(1, 0, 0)): """Set the prescribed motion.""" curve.create(self.stub) self.lcid = curve.id self.motion = motion.value - if self.motion == Motion.DISPLACEMENT: - self.motion = 1 self.dir = dir def create(self): diff --git a/src/ansys/dyna/core/pre/dynaem.py b/src/ansys/dyna/core/pre/dynaem.py index 63b405e2b..3ce911995 100644 --- a/src/ansys/dyna/core/pre/dynaem.py +++ b/src/ansys/dyna/core/pre/dynaem.py @@ -808,9 +808,11 @@ def create(self): """Set parameter for Randles Cell.""" if self.define_batmac: sid = 0 + soutouid = 0 if self.psid is not None: sid = self.psid.create(self.stub) - soctou = self.soctou.create(self.stub) + if self.soctou is not None: + soutouid = self.soctou.create(self.stub) modified_prm = [] for par in self.prm: if type(par) == float: @@ -826,7 +828,7 @@ def create(self): q=self.q, cq=self.cq, socinit=self.socinit, - soctou=soctou, + soctou=soutouid, chargedirparam=modified_prm, temp=self.temp, frther=self.frther,