Esempio n. 1
0
import sys
import pandas as pd
import numpy as np
sys.path.append(r'C:\LAYLA')
from src.LAYLA_V02.constraints import Constraints
from src.LAYLA_V02.materials import Material
from src.CLA.lampam_functions import calc_lampam
from src.CLA.ABD import A_from_lampam, B_from_lampam, D_from_lampam
from src.LAYLA_V02.save_set_up import save_constraints_LAYLA
from src.LAYLA_V02.save_set_up import save_materials
from src.divers.excel import append_df_to_excel, autofit_column_widths, delete_file

n_plies_in_panels = 40
n_pop = 57
filename = 'pop_sym_C0_40plies.xlsx'
delete_file(filename)
#==============================================================================
# Material properties
#==============================================================================
# Elastic modulus in the fibre direction (Pa)
E11 = 130e9
# Elastic modulus in the transverse direction (Pa)
E22 = 9e9
# Poisson's ratio relating transverse deformation and axial loading (-)
nu12 = 0.3
# In-plane shear modulus (Pa)
G12 = 4e9
mat = Material(E11=E11, E22=E22, G12=G12, nu12=nu12)
#==============================================================================
# Design guidelines
#==============================================================================
Esempio n. 2
0
                        global_node_limit_p=global_node_limit_p,
                        local_node_limit_final=local_node_limit_final,
                        repair_membrane_switch=repair_membrane_switch,
                        repair_flexural_switch=repair_flexural_switch,
                        penalty_10_lampam_switch=penalty_10_lampam_switch,
                        penalty_10_pc_switch=penalty_10_pc_switch,
                        penalty_ipo_switch=penalty_ipo_switch,
                        penalty_bal_switch=penalty_bal_switch,
                        type_obj_func=1)

#==============================================================================
# DO NOT CHANGE FROM THIS POINT
#==============================================================================
result_filename = constraints_set + '-' + str(n_plies) + 'plies-' \
+ optimisation_type +  filename_end + '.xlsx'
delete_file(result_filename)

### Import the target lamination parameters
if constraints_set == 'C0':
    data_filename = '/LAYLA/populations/pop_sym_C0_' \
    + str(n_plies) + 'plies.xlsx'
else:
    data_filename = '/LAYLA/populations/pop_sym_C1_' \
    + str(n_plies) + 'plies.xlsx'

### Import the target lamination parameters
data = pd.read_excel(data_filename, sheet_name='stacks')
if data.size == 0:
    raise Exception(
        'Oops, no population of target lamination parameters found')