diff --git a/experiment/homogeneous.py b/experiment/homogeneous.py new file mode 100644 index 0000000000000000000000000000000000000000..538862a56f476591ad075bb72cb6864d4124dfae --- /dev/null +++ b/experiment/homogeneous.py @@ -0,0 +1,104 @@ +import math + +class ParameterSet(dict): + def __init__(self, *args, **kwargs): + super(ParameterSet, self).__init__(*args, **kwargs) + self.__dict__ = self + +parameterSet = ParameterSet() + +############################################# +# Paths +############################################# +parameterSet.outputPath = '/home/klaus/Desktop/Dune_release/dune-microstructure/outputs' +parameterSet.baseName= 'homogeneous' #(needed for Output-Filename) + +#Indicator function that determines both phases +# x[0] : x-component +# x[1] : y-component +# x[2] : z-component +def indicatorFunction(x): + # --- replace with your definition of indicatorFunction: + return 1 #Phase1 + + + +########### Options for material phases: ################################# +# 1. "isotropic" 2. "orthotropic" 3. "transversely_isotropic" 4. "general_anisotropic" +######################################################################### +## Notation - Parameter input : +# isotropic (Lame parameters) : [mu , lambda] +# orthotropic : [E1,E2,E3,G12,G23,G31,nu12,nu13,nu23] +# transversely_isotropic : [E1,E2,G12,nu12,nu23] +# general_anisotropic : full compliance matrix C +###################################################################### +# --- Number of material phases +Phases=1 +#--- Define different material phases: +#- PHASE 1 +phase1_type="isotropic" +materialParameters_phase1 = [80, 80] + + + +#--- define prestrain function for each phase +# (also works with non-constant values) +def prestrain_phase1(x): + return [[1, 0, 0], [0,1,0], [0,0,1]] + + + + +############################################# +# Grid parameters +############################################# +## numLevels : Number of Levels on which solution is computed. starting with a 2x2x2 cube mesh. +## {start,finish} computes on all grid from 2^(start) to 2^finish refinement +#---------------------------------------------------- +parameterSet.numLevels= '3 3' # computes all levels from first to second entry + +############################################# +# Assembly options +############################################# +parameterSet.set_IntegralZero = 1 #(default = false) +parameterSet.set_oneBasisFunction_Zero = 1 #(default = false) +#parameterSet.arbitraryLocalIndex = 7 #(default = 0) +#parameterSet.arbitraryElementNumber = 3 #(default = 0) + +############################################# +# Solver Options, Type: #1: CG - SOLVER , #2: GMRES - SOLVER, #3: QR - SOLVER (default), #4: UMFPACK - SOLVER +############################################# +parameterSet.Solvertype = 3 # recommended to use iterative solver (e.g GMRES) for finer grid-levels +parameterSet.Solver_verbosity = 0 #(default = 2) degree of information for solver output + + +############################################# +# Write/Output options #(default=false) +############################################# +# --- (Optional output) write Material / prestrain / Corrector functions to .vtk-Files: +parameterSet.write_materialFunctions = 1 # VTK indicator function for material/prestrain definition +#parameterSet.write_prestrainFunctions = 1 # VTK norm of B (currently not implemented) + +# --- (Additional debug output) +parameterSet.print_debug = 0 #(default=false) + +# --- Write Correctos to VTK-File: +parameterSet.write_VTK = 1 + +# --- (Optional output) L2Error, integral mean: +#parameterSet.write_L2Error = 1 +#parameterSet.write_IntegralMean = 1 + +# --- check orthogonality (75) from paper: +parameterSet.write_checkOrthogonality = 1 + +# --- Write corrector-coefficients to log-File: +#parameterSet.write_corrector_phi1 = 1 +#parameterSet.write_corrector_phi2 = 1 +#parameterSet.write_corrector_phi3 = 1 + +# --- Print Condition number of matrix (can be expensive): +#parameterSet.print_conditionNumber= 1 #(default=false) + +# --- write effective quantities to Matlab-folder for symbolic minimization: +#parameterSet.write_toMATLAB = 0 # writes effective quantities to .txt-files QMatrix.txt and BMatrix.txt diff --git a/inputs/material_neukamm.py b/experiment/material_neukamm.py similarity index 100% rename from inputs/material_neukamm.py rename to experiment/material_neukamm.py diff --git a/inputs/material_orthotropic.py b/experiment/material_orthotropic.py similarity index 100% rename from inputs/material_orthotropic.py rename to experiment/material_orthotropic.py diff --git a/inputs/parametrized_laminate.py b/experiment/parametrized_laminate.py similarity index 100% rename from inputs/parametrized_laminate.py rename to experiment/parametrized_laminate.py diff --git a/materials/python_matrix_operations.py b/experiment/python_matrix_operations.py similarity index 100% rename from materials/python_matrix_operations.py rename to experiment/python_matrix_operations.py diff --git a/materials/__pycache__/material.cpython-38.pyc b/materials/__pycache__/material.cpython-38.pyc deleted file mode 100644 index 444b2c133dc12c1e9e08d2a9c3bb855756d7c47c..0000000000000000000000000000000000000000 Binary files a/materials/__pycache__/material.cpython-38.pyc and /dev/null differ diff --git a/materials/__pycache__/material_neukamm.cpython-38.pyc b/materials/__pycache__/material_neukamm.cpython-38.pyc deleted file mode 100644 index 9d7421aeea4ce841358b2a6f70980f04d0e1084f..0000000000000000000000000000000000000000 Binary files a/materials/__pycache__/material_neukamm.cpython-38.pyc and /dev/null differ diff --git a/materials/__pycache__/material_test.cpython-38.pyc b/materials/__pycache__/material_test.cpython-38.pyc deleted file mode 100644 index 5185825128d19bce06d794b7260599da858ed7ed..0000000000000000000000000000000000000000 Binary files a/materials/__pycache__/material_test.cpython-38.pyc and /dev/null differ diff --git a/materials/__pycache__/python_matrix_operations.cpython-38.pyc b/materials/__pycache__/python_matrix_operations.cpython-38.pyc deleted file mode 100644 index 9aaa3d38b1a8b5256d89828869ca69253aec7e9f..0000000000000000000000000000000000000000 Binary files a/materials/__pycache__/python_matrix_operations.cpython-38.pyc and /dev/null differ diff --git a/materials/__pycache__/two_phase_material.cpython-38.pyc b/materials/__pycache__/two_phase_material.cpython-38.pyc deleted file mode 100644 index e7624af2ace8ebb1cb9aa0900aead6aba77a25ba..0000000000000000000000000000000000000000 Binary files a/materials/__pycache__/two_phase_material.cpython-38.pyc and /dev/null differ diff --git a/materials/__pycache__/two_phase_material_1.cpython-38.pyc b/materials/__pycache__/two_phase_material_1.cpython-38.pyc deleted file mode 100644 index 78b1dd2bd3091a8f4709ecd09742ae4c3d6ac0a7..0000000000000000000000000000000000000000 Binary files a/materials/__pycache__/two_phase_material_1.cpython-38.pyc and /dev/null differ diff --git a/materials/__pycache__/two_phase_material_2.cpython-38.pyc b/materials/__pycache__/two_phase_material_2.cpython-38.pyc deleted file mode 100644 index 86b1c59d67e8cc248fd7ae49f0d16bdafe0fc4fc..0000000000000000000000000000000000000000 Binary files a/materials/__pycache__/two_phase_material_2.cpython-38.pyc and /dev/null differ diff --git a/materials/__pycache__/two_phase_material_3.cpython-38.pyc b/materials/__pycache__/two_phase_material_3.cpython-38.pyc deleted file mode 100644 index 82d3ba4f63541c8c5816860928b1a814eaa272ba..0000000000000000000000000000000000000000 Binary files a/materials/__pycache__/two_phase_material_3.cpython-38.pyc and /dev/null differ diff --git a/materials/homogeneous.py b/materials/homogeneous.py deleted file mode 100644 index 7369270db99d37ad7d6d563d6afcb77a0dff4c58..0000000000000000000000000000000000000000 --- a/materials/homogeneous.py +++ /dev/null @@ -1,35 +0,0 @@ -import math - - -#Indicator function that determines both phases -# x[0] : x-component -# x[1] : y-component -# x[2] : z-component -def indicatorFunction(x): - # --- replace with your definition of indicatorFunction: - return 1 #Phase1 - - - -########### Options for material phases: ################################# -# 1. "isotropic" 2. "orthotropic" 3. "transversely_isotropic" 4. "general_anisotropic" -######################################################################### -## Notation - Parameter input : -# isotropic (Lame parameters) : [mu , lambda] -# orthotropic : [E1,E2,E3,G12,G23,G31,nu12,nu13,nu23] -# transversely_isotropic : [E1,E2,G12,nu12,nu23] -# general_anisotropic : full compliance matrix C -###################################################################### -# --- Number of material phases -Phases=1 -#--- Define different material phases: -#- PHASE 1 -phase1_type="isotropic" -materialParameters_phase1 = [80, 80] - - - -#--- define prestrain function for each phase -# (also works with non-constant values) -def prestrain_phase1(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] diff --git a/materials/material_neukamm.py b/materials/material_neukamm.py deleted file mode 100644 index c654bd8b086b7123b36fb40d5b1c63c1343d0035..0000000000000000000000000000000000000000 --- a/materials/material_neukamm.py +++ /dev/null @@ -1,76 +0,0 @@ -import math -from python_matrix_operations import * -import ctypes -import os -import sys -#--------------------------------------------------------------- - - - -#--- define indicator function for material phases -# x[0] : y1-component -# x[1] : y2-component -# x[2] : x3-component -#To indicate phases return either : 1 / 2 / 3 -############### -# Cross -############### -def indicatorFunction(x): - theta=0.25 - factor=1 - if (x[0] <-0.5+theta and x[2]<-0.5+theta): - return 1 #Phase1 - elif (x[1]<-0.5+theta and x[2]>0.5-theta): - return 2 #Phase2 - else : - return 3 #Phase3 - -############### -# Wood -############### -# def indicatorFunction(x): -# theta=0.25 - # if ((abs(x[0]) < theta/2) and x[2]<0.25): - # return 1 #latewood - # elif ((abs(x[0]) > theta/2) and x[2]<0.25): - # return 2 #earlywood - # else : - # return 0 #Phase3 - - -########### Options for material phases: ################################# -# 1. "isotropic" 2. "orthotropic" 3. "transversely_isotropic" 4. "general_anisotropic" -######################################################################### -## Notation - Parameter input : -# isotropic (Lame parameters) : [mu , lambda] -# orthotropic : [E1,E2,E3,G12,G23,G31,nu12,nu13,nu23] # see https://en.wikipedia.org/wiki/Poisson%27s_ratio with x=1,y=2,z=3 -# transversely_isotropic : [E1,E2,G12,nu12,nu23] -# general_anisotropic : full compliance matrix C -###################################################################### -# --- Number of material phases -Phases=3 -#--- Define different material phases: -#- PHASE 1 -phase1_type="isotropic" -materialParameters_phase1 = [80, 80] - -#- PHASE 2 -phase2_type="isotropic" -materialParameters_phase2 = [80, 80] - -#- PHASE 3 -phase3_type="isotropic" -materialParameters_phase3 = [60, 25] - - -#--- define prestrain function for each phase -# (also works with non-constant values) -def prestrain_phase1(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def prestrain_phase2(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def prestrain_phase3(x): - return [[0, 0, 0], [0,0,0], [0,0,0]] - # return [[x[0],0 ,0 ], [0,0,x[1]], [0,0,x[2]]] diff --git a/materials/material_neukamm_old.py b/materials/material_neukamm_old.py deleted file mode 100644 index 790e3a436fa63b2071fd95815a0a0bf22ab84c6a..0000000000000000000000000000000000000000 --- a/materials/material_neukamm_old.py +++ /dev/null @@ -1,50 +0,0 @@ -import math - -# DEPRECATED!!!! just for reference - -#Indicator function that determines both phases -# x[0] : y1-component -# x[1] : y2-component -# x[2] : x3-component -# --- replace with your definition of indicatorFunction: -############### -# Wood -############### -# def f(x): -# theta=0.25 - # if ((abs(x[0]) < theta/2) and x[2]<0.25): - # return 1 #latewood - # elif ((abs(x[0]) > theta/2) and x[2]<0.25): - # return 2 #earlywood - # else : - # return 0 #Phase3 - -# def b1(x): -# return [[.5, 0, 0], [0,1,0], [0,0,0]] - -# def b2(x): -# return [[.4, 0, 0], [0,.4,0], [0,0,0]] - -# def b3(x): -# return [[0, 0, 0], [0,0,0], [0,0,0]] -############### -# Cross -############### -def f(x): - theta=0.25 - factor=1 - if (x[0] <-1/2+theta and x[2]<-1/2+theta): - return 1 #Phase1 - elif (x[1]< -1/2+theta and x[2]>1/2-theta): - return 2 #Phase2 - else : - return 0 #Phase3 - -def b1(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def b2(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def b3(x): - return [[0, 0, 0], [0,0,0], [0,0,0]] diff --git a/materials/material_orthotropic.py b/materials/material_orthotropic.py deleted file mode 100644 index 3f9ab71e11e7d32965979baeb7ec8e742ea54232..0000000000000000000000000000000000000000 --- a/materials/material_orthotropic.py +++ /dev/null @@ -1,83 +0,0 @@ -import math -from python_matrix_operations import * -import ctypes -import os -import sys -#--------------------------------------------------------------- - - - -#--- define indicator function -def indicatorFunction(x): - theta=0.25 - factor=1 - if (x[0] <-0.5+theta and x[2]<-0.5+theta): - return 1 #Phase1 - elif (x[1]<-0.5+theta and x[2]>0.5-theta): - return 2 #Phase2 - else : - return 3 #Phase3 - - -########### Options for material phases: ################################# -# 1. "isotropic" 2. "orthotropic" 3. "transversely_isotropic" 4. "general_anisotropic" -######################################################################### -## Notation - Parameter input : -# isotropic (Lame parameters) : [mu , lambda] -# orthotropic : [E1,E2,E3,G12,G23,G31,nu12,nu13,nu23] # see https://en.wikipedia.org/wiki/Poisson%27s_ratio with x=1,y=2,z=3 -# transversely_isotropic : [E1,E2,G12,nu12,nu23] -# general_anisotropic : full compliance matrix C -###################################################################### - -# --- Number of material phases -Phases=3 - - -#--- Define different material phases: - -#- PHASE 1 -phase1_type="orthotropic" -materialParameters_phase1 = [11.2e3,630,1190,700,230,960,0.63 ,0.49,0.37] # walnut parameters (values for compliance matrix) see [Dimwoodie; Timber its nature and behavior p.109] - -#- PHASE 2 -phase2_type="orthotropic" -# materialParameters_phase2 = [10.7e3,430,710,620,23,500, 0.51 ,0.38,0.31] # Norway spruce parameters (values for compliance matrix) see [Dimwoodie; Timber its nature and behavior p.109] -materialParameters_phase2 = [11.2e3,630,1190,700,230,960,0.63 ,0.49,0.37] - -# Pass a set of FrameVectors to transform material properties to this Frame -# phase2_FrameVector1 = [1, 0 ,0] -# phase2_FrameVector2 = [0, 5, 0] -# phase2_FrameVector3 = [0, 0, 1] - -phase2_axis = 2 -phase2_angle = np.pi/2.0 -# phase2_angle = 2*np.pi/12 - - - -#- PHASE 3 -phase3_type="isotropic" -materialParameters_phase3 = [60, 25] - - -#--- for general anisotopic material the compliance matrix is required: -# phase3_type="general_anisotropic" -# materialParameters_phase3 = np.array([[1.0, 0.0, 0.0, 0.0 , 0.0, 0.0], -# [0.0, 1.0, 0.0, 0.0 , 0.0, 0.0], -# [0.0, 0.0, 1.0, 0.0 , 0.0, 0.0], -# [0.0, 0.0, 0.0, math.sqrt(2), 0.0, 0.0], -# [0.0, 0.0, 0.0, 0.0 , 1.0, 0.0], -# [0.0, 0.0, 0.0, 0.0 , 0.0, 1.0]]) - - -#--- define prestrain function for each phase -# (also works with non-constant values) -def prestrain_phase1(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def prestrain_phase2(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def prestrain_phase3(x): - return [[0, 0, 0], [0,0,0], [0,0,0]] - # return [[x[0],0 ,0 ], [0,0,x[1]], [0,0,x[2]]] diff --git a/materials/material_test.py b/materials/material_test.py deleted file mode 100644 index b3f0737dcdef5f81fd7383f5833bfa2f43494acf..0000000000000000000000000000000000000000 --- a/materials/material_test.py +++ /dev/null @@ -1,85 +0,0 @@ -import math -from python_matrix_operations import * -import ctypes -import os -import sys -#--------------------------------------------------------------- - -#To indicate phases return either : 1 / 2 / 3 - -#--- define indicator function -def indicatorFunction(x): - theta=0.25 - factor=1 - if (x[0] <-0.5+theta and x[2]<-0.5+theta): - return 1 #Phase1 - elif (x[1]<-0.5+theta and x[2]>0.5-theta): - return 2 #Phase2 - else : - return 3 #Phase3 - - -########### Options for material phases: ################################# -# 1. "isotropic" 2. "orthotropic" 3. "transversely_isotropic" 4. "general_anisotropic" -######################################################################### -## Notation - Parameter input : -# isotropic (Lame parameters) : [mu , lambda] -# orthotropic : [E1,E2,E3,G12,G23,G31,nu12,nu13,nu23] # see https://en.wikipedia.org/wiki/Poisson%27s_ratio with x=1,y=2,z=3 -# transversely_isotropic : [E1,E2,G12,nu12,nu23] -# general_anisotropic : full compliance matrix C -###################################################################### - -# --- Number of material phases -Phases=3 - - -#--- Define different material phases: - -#- PHASE 1 -# phase1_type="isotropic" -# materialParameters_phase1 = [80, 80] - -# phase1_type="orthotropic" -# materialParameters_phase1 = [11.2e3,630,1190,700,230,960,0.63 ,0.49,0.37] # walnut parameters (values for compliance matrix) -# # materialParameters_phase1 = [10.7e3,430,710,620,23,500, 0.51 ,0.38,0.31] # Norway spruce parameters (values for compliance matrix) - -phase1_type="general_anisotropic" -materialParameters_phase1 = np.array([[1.0, 8.0, 16.0, 16.0 , 8.0, 8.0], - [8.0, 1.0, 16.0, 16.0 , 8.0, 8.0], - [8.0, 8.0, 1.0, 16.0 , 8.0, 8.0], - [8.0, 8.0, 16.0, math.sqrt(2), 8.0, 8.0], - [8.0, 8.0, 16.0, 16.0 , 8.0, 8.0], - [8.0, 8.0, 16.0, 16.0 , 8.0, 1.0]]) - -#- PHASE 2 -phase2_type="transversely_isotropic" -materialParameters_phase2 = [11.2e3,1190,960,0.63 ,0.37] - -# phase2_type="isotropic" -# materialParameters_phase2 = [80, 80] - -#- PHASE 3 -# phase3_type="isotropic" -# materialParameters_phase3 = [60, 25] - -#--- for general anisotopic material the compliance matrix is required: -phase3_type="general_anisotropic" -materialParameters_phase3 = np.array([[1.0, 0.0, 0.0, 0.0 , 0.0, 0.0], - [0.0, 1.0, 0.0, 0.0 , 0.0, 0.0], - [0.0, 0.0, 1.0, 0.0 , 0.0, 0.0], - [0.0, 0.0, 0.0, math.sqrt(2), 0.0, 0.0], - [0.0, 0.0, 0.0, 0.0 , 1.0, 0.0], - [0.0, 0.0, 0.0, 0.0 , 0.0, 1.0]]) - - -#--- define prestrain function for each phase -# (also works with non-constant values) -def prestrain_phase1(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def prestrain_phase2(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def prestrain_phase3(x): - return [[0, 0, 0], [0,0,0], [0,0,0]] - # return [[x[0],0 ,0 ], [0,0,x[1]], [0,0,x[2]]] diff --git a/materials/parametrized_laminate.py b/materials/parametrized_laminate.py deleted file mode 100644 index c05161f3dbad259f4f2e3697c1ec53fa01981306..0000000000000000000000000000000000000000 --- a/materials/parametrized_laminate.py +++ /dev/null @@ -1,68 +0,0 @@ -import math -from python_matrix_operations import * -import ctypes -import os -import sys -#--------------------------------------------------------------- - - -#--- define indicator function -def indicatorFunction(x): - theta=0.25 - factor=1 - if (abs(x[0]) < (theta/2) and x[2] < 0 ): - return 1 #Phase1 - elif (abs(x[0]) > (theta/2) and x[2] > 0 ): - return 2 #Phase2 - elif (abs(x[0]) < (theta/2) and x[2] > 0 ): - return 3 #Phase3 - else : - return 4 #Phase4 - - -########### Options for material phases: ################################# -# 1. "isotropic" 2. "orthotropic" 3. "transversely_isotropic" 4. "general_anisotropic" -######################################################################### -## Notation - Parameter input : -# isotropic (Lame parameters) : [mu , lambda] -# orthotropic : [E1,E2,E3,G12,G23,G31,nu12,nu13,nu23] # see https://en.wikipedia.org/wiki/Poisson%27s_ratio with x=1,y=2,z=3 -# transversely_isotropic : [E1,E2,G12,nu12,nu23] -# general_anisotropic : full compliance matrix C -###################################################################### - -# --- Number of material phases -Phases=4 - -#--- Define different material phases: - -#- PHASE 1 -phase1_type="isotropic" -materialParameters_phase1 = [2.0, 0] - -#- PHASE 2 -phase2_type="isotropic" -materialParameters_phase2 = [1.0, 0] - -#- PHASE 3 -phase3_type="isotropic" -materialParameters_phase3 = [2.0, 0] - -#- PHASE 4 -phase4_type="isotropic" -materialParameters_phase4 = [1.0, 0] - - -#--- define prestrain function for each phase -# (also works with non-constant values) -def prestrain_phase1(x): - return [[2, 0, 0], [0,2,0], [0,0,2]] - -def prestrain_phase2(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def prestrain_phase3(x): - return [[0, 0, 0], [0,0,0], [0,0,0]] - -def prestrain_phase4(x): - return [[0, 0, 0], [0,0,0], [0,0,0]] - diff --git a/materials/two_phase_material_1.py b/materials/two_phase_material_1.py deleted file mode 100644 index b09bf3c98204d17019b84ad65cfb42dbee6434f6..0000000000000000000000000000000000000000 --- a/materials/two_phase_material_1.py +++ /dev/null @@ -1,44 +0,0 @@ -import math - - -#Indicator function that determines both phases -# x[0] : x-component -# x[1] : y-component -# x[2] : z-component -def indicatorFunction(x): - # --- replace with your definition of indicatorFunction: - if (abs(x[0]) > 0.25): - return 1 #Phase1 - else : - return 2 #Phase2 - - -########### Options for material phases: ################################# -# 1. "isotropic" 2. "orthotropic" 3. "transversely_isotropic" 4. "general_anisotropic" -######################################################################### -## Notation - Parameter input : -# isotropic (Lame parameters) : [mu , lambda] -# orthotropic : [E1,E2,E3,G12,G23,G31,nu12,nu13,nu23] -# transversely_isotropic : [E1,E2,G12,nu12,nu23] -# general_anisotropic : full compliance matrix C -###################################################################### -# --- Number of material phases -Phases=2 -#--- Define different material phases: -#- PHASE 1 -phase1_type="isotropic" -materialParameters_phase1 = [80, 80] - -#- PHASE 2 -phase2_type="isotropic" -materialParameters_phase2 = [80, 80] - - - -#--- define prestrain function for each phase -# (also works with non-constant values) -def prestrain_phase1(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def prestrain_phase2(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] diff --git a/materials/two_phase_material_2.py b/materials/two_phase_material_2.py deleted file mode 100644 index b26dd94b7b68934ce5b75f6c19607e3607802a0b..0000000000000000000000000000000000000000 --- a/materials/two_phase_material_2.py +++ /dev/null @@ -1,44 +0,0 @@ -import math - - -#Indicator function that determines both phases -# x[0] : x-component -# x[1] : y-component -# x[2] : z-component -def indicatorFunction(x): - # --- replace with your definition of indicatorFunction: - if (abs(x[1]) > 0.25): - return 1 #Phase1 - else : - return 2 #Phase2 - - -########### Options for material phases: ################################# -# 1. "isotropic" 2. "orthotropic" 3. "transversely_isotropic" 4. "general_anisotropic" -######################################################################### -## Notation - Parameter input : -# isotropic (Lame parameters) : [mu , lambda] -# orthotropic : [E1,E2,E3,G12,G23,G31,nu12,nu13,nu23] -# transversely_isotropic : [E1,E2,G12,nu12,nu23] -# general_anisotropic : full compliance matrix C -###################################################################### -# --- Number of material phases -Phases=2 -#--- Define different material phases: -#- PHASE 1 -phase1_type="isotropic" -materialParameters_phase1 = [80, 80] - -#- PHASE 2 -phase2_type="isotropic" -materialParameters_phase2 = [80, 80] - - - -#--- define prestrain function for each phase -# (also works with non-constant values) -def prestrain_phase1(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def prestrain_phase2(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] diff --git a/materials/two_phase_material_3.py b/materials/two_phase_material_3.py deleted file mode 100644 index f087f5d4c252b7bf5b75dcdbc1f0bbb91aef9e34..0000000000000000000000000000000000000000 --- a/materials/two_phase_material_3.py +++ /dev/null @@ -1,44 +0,0 @@ -import math - - -#Indicator function that determines both phases -# x[0] : x-component -# x[1] : y-component -# x[2] : z-component -def f(x): - # --- replace with your definition of indicatorFunction: - if (abs(x[2]) > 0.25): - return 1 #Phase1 - else : - return 0 #Phase2 - - -########### Options for material phases: ################################# -# 1. "isotropic" 2. "orthotropic" 3. "transversely_isotropic" 4. "general_anisotropic" -######################################################################### -## Notation - Parameter input : -# isotropic (Lame parameters) : [mu , lambda] -# orthotropic : [E1,E2,E3,G12,G23,G31,nu12,nu13,nu23] -# transversely_isotropic : [E1,E2,G12,nu12,nu23] -# general_anisotropic : full compliance matrix C -###################################################################### -# --- Number of material phases -Phases=2 -#--- Define different material phases: -#- PHASE 1 -phase1_type="isotropic" -materialParameters_phase1 = [80, 80] - -#- PHASE 2 -phase2_type="isotropic" -materialParameters_phase2 = [80, 80] - - - -#--- define prestrain function for each phase -# (also works with non-constant values) -def prestrain_phase1(x): - return [[1, 0, 0], [0,1,0], [0,0,1]] - -def prestrain_phase2(x): - return [[1, 0, 0], [0,1,0], [0,0,1]]