Skip to content

Commit

Permalink
Remove reference_points from beso_conf; value is always 'integration …
Browse files Browse the repository at this point in the history
…points'
  • Loading branch information
gbroques committed Sep 11, 2020
1 parent e39ad93 commit 1aa41dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion beso/beso_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
# TODO: If we know we want COMPOSITE for S8R and S6 shell elements, then why make it a config option?
shells_as_composite = False # True - use more integration points to catch bending stresses (ccx 2.12 WILL FAIL for other than S8R and S6 shell elements)
# False - use ordinary shell section
reference_points = "integration points" # "integration points" - read int. pt values (stresses) from .dat file,
sensitivity_averaging = False # True - averaging sensitivity numbers with previous iteration, False - do not average

mass_addition_ratio = 0.01 # mass to be added in each iteration
Expand Down
5 changes: 3 additions & 2 deletions beso/beso_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def second_order_info(elm_type):
# elm_states is a dict of the elements containing 0 for void element or 1 for full element
def write_inp(file_name, file_nameW, elm_states, number_of_states, domains, domains_from_config, domain_optimized,
domain_thickness, domain_offset, domain_orientation, domain_material, domain_volumes, domain_shells,
plane_strain, plane_stress, axisymmetry, save_iteration_results, i, reference_points, shells_as_composite,
plane_strain, plane_stress, axisymmetry, save_iteration_results, i, shells_as_composite,
optimization_base, displacement_graph, domain_FI_filled):
fR = open(file_name, "r")
check_line_endings = False
Expand Down Expand Up @@ -277,7 +277,8 @@ def add_orientation():
for dn in domains_from_config:
fW.write("*EL PRINT, " + "ELSET=" + dn + "\n")
fW.write("ENER\n")
if (reference_points == "integration points") and (domain_FI_filled is True):
# if reference_points == "integration points" AND ...
if domain_FI_filled is True:
for dn in domains_from_config:
fW.write("*EL PRINT, " + "ELSET=" + dn + "\n")
fW.write("S\n")
Expand Down
7 changes: 3 additions & 4 deletions beso/beso_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
FI_violated_tolerance = 1
decay_coefficient = -0.2
shells_as_composite = False
reference_points = "integration points"
sensitivity_averaging = False
mass_addition_ratio = 0.01
mass_removal_ratio = 0.03
Expand Down Expand Up @@ -117,7 +116,6 @@
msg += ("FI_violated_tolerance = %s\n" % FI_violated_tolerance)
msg += ("decay_coefficient = %s\n" % decay_coefficient)
msg += ("shells_as_composite = %s\n" % shells_as_composite)
msg += ("reference_points = %s\n" % reference_points)
msg += ("mass_addition_ratio = %s\n" % mass_addition_ratio)
msg += ("mass_removal_ratio = %s\n" % mass_removal_ratio)
msg += ("compensate_state_filter = %s\n" % compensate_state_filter)
Expand Down Expand Up @@ -279,7 +277,7 @@
beso_lib.write_inp(file_name, file_nameW, elm_states, number_of_states, domains, domains_from_config,
domain_optimized, domain_thickness, domain_offset, domain_orientation, domain_material,
domain_volumes, domain_shells, plane_strain, plane_stress, axisymmetry, save_iteration_results,
i, reference_points, shells_as_composite, optimization_base, displacement_graph,
i, shells_as_composite, optimization_base, displacement_graph,
domain_FI_filled)
# running CalculiX analysis
ccx_path = shutil.which('ccx')
Expand All @@ -292,7 +290,8 @@
subprocess.call([ccx_path, file_nameW], cwd=path, shell=True)

# reading results and computing failure indices
if reference_points == "integration points" or optimization_base == "stiffness": # from .dat file
# if reference_points == "integration points" or ... stiffness
if optimization_base == "stiffness": # from .dat file
[FI_step, energy_density_step, disp_i, energy_density_eigen] = \
beso_lib.import_FI_int_pt(file_nameW, domains, criteria, domain_FI, file_name, elm_states,
domains_from_config, displacement_graph)
Expand Down

0 comments on commit 1aa41dd

Please sign in to comment.