import math #from python_matrix_operations import * import ctypes import os import sys import numpy as np import elasticity_toolbox as elast param_delta_theta = 0.5 param_r = 0.5 # --- define geometry def indicatorFunction(x): if (x[2]>=.5-param_r) and (x[0]<=param_r-.5): #top left square - fibre orientation = y_1 return 1 # fibre1 elif (x[2]<=param_r-.5) and (x[1]<=param_r-.5): #bottom back - fibre orientation = y_2 return 2 else : return 3 # matrix # --- Number of material phases Phases=3 # --- PHASE 1 fibre phase1_type="isotropic" materialParameters_phase1 = [1.2, 0.48] def prestrain_phase1(x): factor=1 return [[factor,0,0],[0,factor,0],[0,0,factor]] # --- PHASE 2 fibre phase2_type="isotropic" # E in MPa and nu materialParameters_phase2 = [1.2,0.48] def prestrain_phase2(x): return prestrain_phase1(x) # --- PHASE 3 matrix phase3_type="isotropic" materialParameters_phase3 = [1, 0.4] def prestrain_phase3(x): factor = 0 return [[factor,0,0],[0,factor,0],[0,0,factor]]