Ejemplo n.º 1
0
for dno in range(len(domains_from_config) - 1):
    msg += str(dno + 1).rjust(17, " ") + ")"
if len(domains_from_config) > 1:
    msg += "all".rjust(17, " ") + ")"
if displacement_graph:
    for (ns, component) in displacement_graph:
        if component == "total":  # total displacement
            msg += (" " + ns + "(u_total)").rjust(18, " ")
        else:
            msg += (" " + ns + "(" + component + ")").rjust(18, " ")
msg += "\n"
beso_lib.write_to_log(file_name, msg)

# preparing for writing quick results
file_name_resulting_states = os.path.join(path, "resulting_states")
[en_all_vtk, associated_nodes] = beso_lib.vtk_mesh(file_name_resulting_states, nodes, Elements)

# ITERATION CYCLE
sensitivity_number = {}
sensitivity_number_old = {}
FI_max = []
FI_mean = []  # list of mean stress in every iteration
FI_mean_without_state0 = []  # mean stress without elements in state 0
FI_violated = []
disp_max = []
i = 0
i_violated = 0
continue_iterations = True
check_tolerance = False
mass_excess = 0.0
elm_states_before_last = {}
Ejemplo n.º 2
0
        msg += "all".rjust(17, " ") + ")"
if displacement_graph:
    for (ns, component) in displacement_graph:
        if component == "total":  # total displacement
            msg += (" " + ns + "(u_total)").rjust(18, " ")
        else:
            msg += (" " + ns + "(" + component + ")").rjust(18, " ")
if optimization_base == "buckling":
    msg += "  buckling_factors"

msg += "\n"
beso_lib.write_to_log(file_name, msg)

# preparing for writing quick results
file_name_resulting_states = os.path.join(path, "resulting_states")
[en_all_vtk, associated_nodes] = beso_lib.vtk_mesh(file_name_resulting_states, nodes, Elements)

# ITERATION CYCLE
sensitivity_number = {}
sensitivity_number_old = {}
FI_max = []
FI_mean = []  # list of mean stress in every iteration
FI_mean_without_state0 = []  # mean stress without elements in state 0
energy_density_mean = []  # list of mean energy density in every iteration
heat_flux_mean = []  # list of mean heat flux in every iteration
FI_violated = []
disp_max = []
buckling_factors_all = []
i = 0
i_violated = 0
continue_iterations = True
Ejemplo n.º 3
0
msg += "\n   i              mass FI_violated_0)"
for dno in range(len(domains_from_config) - 1):
    msg += (" " + str(dno + 1)).rjust(4, " ") + ")"
if len(domains_from_config) > 1:
    msg += " all)"
msg += "          FI_mean    _without_state0         FI_max_0)"
for dno in range(len(domains_from_config) - 1):
    msg += str(dno + 1).rjust(17, " ") + ")"
if len(domains_from_config) > 1:
    msg += "all".rjust(17, " ") + ")"
msg += "\n"
beso_lib.write_to_log(file_name, msg)

# preparing for writing quick results
file_name_resulting_states = "resulting_states"
en_all_vtk = beso_lib.vtk_mesh(file_name_resulting_states, nodes, Elements)

# ITERATION CYCLE
sensitivity_number = {}
sensitivity_number_old = {}
FI_max = []
FI_mean = []  # list of mean stress in every iteration
FI_mean_without_state0 = []  # mean stress without elements in state 0
FI_violated = []
i = 0
i_violated = 0
continue_iterations = True
check_tolerance = False
mass_excess = 0.0
elm_states_before_last = {}
elm_states_last = elm_states