Skip to content

Commit be4348d

Browse files
committed
support table2D parameter in batmac_model
1 parent ea2aeda commit be4348d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ansys/dyna/core/pre/dynaem.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,13 @@ def create(self):
811811
if self.psid is not None:
812812
sid = self.psid.create(self.stub)
813813
soctou = self.soctou.create(self.stub)
814+
modified_prm = []
815+
for par in self.prm:
816+
if type(par) == float:
817+
modified_prm.append(par)
818+
elif type(par) == Table2D:
819+
tid = par.create(self.stub)
820+
modified_prm.append(-tid)
814821
ret = self.stub.CreateEMRandlesBatmac(
815822
EMRandlesBatmacRequest(
816823
rdltype=self.rdltype,
@@ -820,7 +827,7 @@ def create(self):
820827
cq=self.cq,
821828
socinit=self.socinit,
822829
soctou=soctou,
823-
chargedirparam=self.prm,
830+
chargedirparam=modified_prm,
824831
temp=self.temp,
825832
frther=self.frther,
826833
r0toth=self.r0toth,

0 commit comments

Comments
 (0)