You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use code like this elsewhere (I didn't test that this works, but it should at least be very close)
from ansys.materials.manager._models import Constant
from ansys.materials.manager.material import Material
from ansys.materials.manager.util.matml.matml_from_material import MatmlWriter
e = 1e11 #young's modulus
p = 0.44 #possion's ratio
material = Material("MaterialName", material_id=1)
material.models.append(Constant("young's modulus x direction", e))
material.models.append(Constant("young's modulus y direction", e))
material.models.append(Constant("young's modulus z direction", e))
material.models.append(Constant("poisson's ratio xy", p))
material.models.append(Constant("poisson's ratio yz", p))
material.models.append(Constant("poisson's ratio xz", p))
matml_writer = MatmlWriter([material])
with open("matml.xml", "w") as f:
matml_writer.write(f)
The text was updated successfully, but these errors were encountered:
I use code like this elsewhere (I didn't test that this works, but it should at least be very close)
The text was updated successfully, but these errors were encountered: