Skip to content
Snippets Groups Projects
Commit deecc34b authored by whimsial's avatar whimsial
Browse files

Resolved issue with load direction and added comments to the code

parent 11d8d836
Branches
No related tags found
No related merge requests found
......@@ -27,8 +27,13 @@ def create_load(data, **kwargs):
# Iterate through unique ipMT names
mt_names = [sublist[0] for sublist in data]
mt_names = set(mt_names)
i = 0
# Specify that the load is negative for all ipMTs that have even numbers and positive otherwise
for mtname in mt_names:
if int(mtname[-1]) % 2 == 0:
load = -LoadVal
else:
load = LoadVal
# Locate the points to which loads are to be applied
for sublist in data:
if mtname == sublist[0]:
connector_end = sublist[3]
......@@ -40,10 +45,7 @@ def create_load(data, **kwargs):
loadName = 'Load-' + connector_name + '-' + str(connector_end)
loadRegion = a.Set(vertices=loadPoint,
name=loadName)
if i % 2 == 0:
load = -LoadVal
else:
load = LoadVal
# Apply loads
mdb.models[modelname].ConcentratedForce(name=loadName,
createStepName=StepName,
region=loadRegion,
......@@ -51,7 +53,6 @@ def create_load(data, **kwargs):
distributionType=UNIFORM,
field='',
localCsys=None)
i += 1
# ipMTnames = kwargs['ipMTnames']
# StepName = kwargs['StepName']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment