diff --git a/experiment/cylindrical_1.py b/experiment/cylindrical_1.py index 4f68aa30190dbba6436ea57321bfbfe46483a9b5..b3ba49f3f7afe23b0b4d1ad124b512dc3a0c3d78 100644 --- a/experiment/cylindrical_1.py +++ b/experiment/cylindrical_1.py @@ -8,233 +8,14 @@ class ParameterSet(dict): parameterSet = ParameterSet() - -# Example taken from Bartels ' APPROXIMATION OF LARGE BENDING ISOMETRIES WITH -# DISCRETE KIRCHHOFF TRIANGLES - Ex. 4.2' - - ############################################# # Paths ############################################# parameterSet.resultPath = '/home/klaus/Desktop/Dune_bendIso/dune-microstructure/outputs_cylindrical_1' -# parameterSet.outputPath = '/home/klaus/Desktop/Dune_bendIso/dune-microstructure/outputs_buckling_experiment' # This is currently still used in prestrainedMaterial parameterSet.baseName= 'cylindrical_1' -# ############################################# -# # Grid parameters -# ############################################# -# nX=8 -# nY=8 - -# parameterSet.structuredGrid = 'simplex' -# parameterSet.lower = '0 0' -# parameterSet.upper = '4 1' -# parameterSet.elements = str(nX)+' '+ str(nY) - -# parameterSet.macroGridLevel = 2 #good results only for refinementLevel >=4 - -# ############################################# -# # Options -# ############################################# -# parameterSet.measure_analyticalError = False -# parameterSet.measure_isometryError = False -# parameterSet.vtkWrite_analyticalSurfaceNormal = False -# parameterSet.vtkwrite_analyticalSolution = False - - -# parameterSet.conforming_DiscreteJacobian = 0 -# ############################################# -# # Solver parameters -# ############################################# -# # Tolerance of the multigrid solver -# parameterSet.tolerance = 1e-12 -# # Maximum number of multigrid iterations -# parameterSet.maxProximalNewtonSteps = 100 -# # Initial regularization -# parameterSet.initialRegularization = 2000 -# # parameterSet.initialRegularization = 1 -# # Measure convergence -# parameterSet.instrumented = 0 - -# ############################ -# # Problem specifications -# ############################ -# # Dimension of the domain (only used for numerical-test python files) -# parameterSet.dim = 2 - -# ############################################# -# # VTK/Output -# ############################################# -# # Write discrete solution as .vtk-File -# parameterSet.writeVTK = 1 -# parameterSet.vtkwrite_analyticalSolution = 0 -# parameterSet.vtkWrite_analyticalSurfaceNormal = 0 - -# # The grid can be refined several times for a higher resolution in the VTK-file. -# parameterSet.subsamplingRefinement = 2 - -# # Write Dof-Vector to .txt-file -# parameterSet.writeDOFvector = 0 - -# ############################################# -# # Dirichlet boundary indicator -# ############################################# -# def dirichlet_indicator(x) : -# if( (x[0] <= 0.01) or (x[0] >= 3.99)): -# return True -# else: -# return False - - - -# # #Test clamp on other side: -# # def dirichlet_indicator(x) : -# # if( (x[0] >=3.999) or (x[1]<=0.001)): -# # return True -# # else: -# # return False - - -# #boundary-values/derivative function -# # def boundaryValues(x): -# # # a = 0.0 -# # # a = 0.4 -# # a= 1.4 -# # if(x[0] <= -1.99): -# # return [x[0] + a, x[1], 0] -# # if(x[0] >= 1.99): -# # return [x[0] - a, x[1], 0] - - -# # def boundaryValues(x): -# # return [x[0], x[1], 0] - -# # def boundaryValuesDerivative(x): -# # return ((1,0,0), -# # (0,1,0), -# # (0,0,1)) - -# ############################################# -# # Microstructure -# ############################################ -# parameterSet.prestrainFlag = True -# parameterSet.macroscopically_varying_microstructure = False -# parameterSet.read_effectiveQuantities_from_Parset = False # Otherwise the Micro/Cell-Problem is solved once to obtain the quantities. -# # parameterSet.read_effectiveQuantities_from_Parset = True # Otherwise the Micro/Cell-Problem is solved once to obtain the quantities. - -# parameterSet.printMicroOutput = False - -# # parameterSet.read_effectiveQuantities_from_Parset = True -# effectivePrestrain= np.array([[-0.725, 0.0], -# [0.0, -1.0]]); - -# effectiveQuadraticForm = np.array([[19.3, 0.8, 0.0], -# [0.8, 20.3, 0.0], -# [0.0, 0.0, 19.3]]); - - - -# ############################################# -# # Initial iterate function -# ############################################# -# # def f(x): -# # return [x[0], x[1], 0] - -# # def df(x): -# # return ((1,0), -# # (0,1), -# # (0,0)) -# #Rotation: -# def R(beta): -# return [[math.cos(beta),0], -# [0,1], -# [-math.sin(beta),0]] - - -# def f(x): -# a = 0.5 -# if(x[0] <= 0.01): -# return [x[0], x[1], 0] -# elif(x[0] >= 3.99): -# return [x[0] - a, x[1], 0] -# else: -# return [x[0], x[1], 0] - - -# # beta = math.pi/4.0 -# beta= 0.05 -# # beta= math.pi/12.0 -# # beta= 0.10 -# # beta = 0 - -# def df(x): -# a = 0.5 -# if(x[0] <= 0.01): -# # return R(-1.0*beta) -# return R(beta) -# elif(x[0] >= 3.99): -# # return R(beta) -# return R(-1.0*beta) -# else: -# return ((1,0), -# (0,1), -# (0,0)) - - - - -# # def f(x): -# # # a = 0.4 -# # a = 1.4 -# # if(x[0] <= -1.99): -# # return [x[0] + a, x[1], 0] -# # elif(x[0] >= 1.99): -# # return [x[0] - a, x[1], 0] -# # else: -# # return [x[0], x[1], 0] - - -# # def df(x): -# # return ((1,0), -# # (0,1), -# # (0,0)) - - - -# fdf = (f, df) - - -# ############################################# -# # Force -# ############################################ -# parameterSet.assemble_force_term = False - -# def force(x): -# return [0, 0, 0] - - - -# ############################################# -# # Analytical reference Solution -# ############################################# -# # def f(x): -# # return [x[0], x[1], 0] -# # -# # -# # def df(x): -# # return ((1,0), -# # (0,1), -# # (0,0)) -# # -# # -# # fdf = (f, df) - - - ##################### MICROSCALE PROBLEM #################### -# Microstructure used: Isotropic matrix material (phase 2) with prestrained fibers (phase 1) in the top layer aligned with the e2-direction. - class Microstructure: def __init__(self): # gamma = 1.0 @@ -255,11 +36,7 @@ class Microstructure: self.phase2_type="isotropic" self.materialParameters_phase2 = [100, 1.0] - - - - - + #--- Indicator function for material phases def indicatorFunction(self,x): l = 1.0/4.0 # center point of fibre with quadratic cross section of area r**2 @@ -279,12 +56,10 @@ class Microstructure: - - ############################################# # Grid parameters ############################################# -parameterSet.microGridLevel = 4 +parameterSet.microGridLevel = 3 ############################################# # Assembly options @@ -322,3 +97,9 @@ parameterSet.cacheElementMatrices = 1 # --- check orthogonality (75) from paper: parameterSet.write_checkOrthogonality = 0 + + +parameterSet.write_EffectiveQuantitiesToTxt = True + + +