Skip to content

Commit

Permalink
FEM: nonlinear material, add a third yield point and only write yield…
Browse files Browse the repository at this point in the history
… points if they are not empty
  • Loading branch information
berndhahnebach authored and wwmayer committed Jul 3, 2017
1 parent 06054bd commit 3f16f0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/Mod/Fem/FemInputWriterCcx.py
Expand Up @@ -603,8 +603,12 @@ def write_materials(self, f):
if nl_mat_obj.LinearBaseMaterial == mat_obj:
if nl_mat_obj.MaterialModelNonlinearity == "simple hardening":
f.write('*PLASTIC\n')
f.write(nl_mat_obj.YieldPoint1 + '\n')
f.write(nl_mat_obj.YieldPoint2 + '\n')
if nl_mat_obj.YieldPoint1:
f.write(nl_mat_obj.YieldPoint1 + '\n')
if nl_mat_obj.YieldPoint2:
f.write(nl_mat_obj.YieldPoint2 + '\n')
if nl_mat_obj.YieldPoint3:
f.write(nl_mat_obj.YieldPoint3 + '\n')
f.write('\n')

def write_constraints_initialtemperature(self, f):
Expand Down
5 changes: 4 additions & 1 deletion src/Mod/Fem/PyObjects/_FemMaterialMechanicalNonlinear.py
Expand Up @@ -44,8 +44,11 @@ def __init__(self, obj):
obj.addProperty("App::PropertyString", "YieldPoint1", "Fem", "Set stress and strain for yield point one, separated by a comma.")
obj.YieldPoint1 = "235.0, 0.0"

obj.addProperty("App::PropertyString", "YieldPoint2", "Fem", "Set stress and strain for yield point one, separated by a comma.")
obj.addProperty("App::PropertyString", "YieldPoint2", "Fem", "Set stress and strain for yield point two, separated by a comma.")
obj.YieldPoint2 = "241.0, 0.025"

obj.addProperty("App::PropertyString", "YieldPoint3", "Fem", "Set stress and strain for yield point three, separated by a comma.")
obj.YieldPoint3 = ""

def execute(self, obj):
return

0 comments on commit 3f16f0a

Please sign in to comment.