diff --git a/geometries/material_neukamm.py b/geometries/material_neukamm.py index 60e8156d371bcfe8e311fadf082e0e64244d221b..d6d38a76877595d2cb46817b063718b69a93ca6b 100644 --- a/geometries/material_neukamm.py +++ b/geometries/material_neukamm.py @@ -6,9 +6,16 @@ import math # x[1] : y2-component # x[2] : x3-component def f(x): - theta=0.5 - factor=.9 + theta=0.25 + factor=1 # --- replace with your definition of indicatorFunction: + # + # if ((abs(x[0]) < theta/2) and x[2]<0): + # return 1 #Phase1 + # else : + # return 0 #Phase3 + + # if ((abs(x[0]) < theta/2) and x[2]<-1/2+theta): return 1 #Phase1 elif ((abs(x[1]) < factor*theta/2) and x[2]>1/2-factor*theta): @@ -18,10 +25,10 @@ def f(x): def b1(x): - return [[1, 4, 5], [-5, 8, 9], [-5, 8, 0]] + return [[1, 0, 0], [0,1,0], [0,0,1]] def b2(x): - return [[9, 1, 9], [1, 9, 1], [1, 1, 9]] + return [[1, 0, 0], [0,1,0], [0,0,1]] def b3(x): - return [[0,0,0], [0, 0, 0], [0, 8, 0]] + return [[0, 0, 0], [0,0,0], [0,0,0]] diff --git a/inputs/cellsolver.parset b/inputs/cellsolver.parset index 51584a3b25648e19bcda0cbbb7a462baed873adc..5ac539f1693d155e51f555365c4c9e72d75c1a35 100644 --- a/inputs/cellsolver.parset +++ b/inputs/cellsolver.parset @@ -27,7 +27,7 @@ cellDomain=1 ## {start,finish} computes on all grid from 2^(start) to 2^finish refinement #---------------------------------------------------- -numLevels=4 4 +numLevels=2 4 #numLevels = 1 1 # computes all levels from first to second entry #numLevels = 2 2 # computes all levels from first to second entry #numLevels = 1 3 # computes all levels from first to second entry @@ -64,9 +64,9 @@ lambda1=1.0 # better: pass material parameters as a vector -mu=80 60 20 -lambda=80 25 10 -rho=1.0 0 +mu=80 80 60 +lambda=80 80 25 +#rho=1.0 0 # ---volume fraction (default value = 1.0/4.0) @@ -96,8 +96,8 @@ material_prestrain_imp= "material_neukamm" #(Python-indicator-function with sa # --- (Optional output) write Material / prestrain / Corrector functions to .vtk-Files (default=false): -write_materialFunctions = true -write_prestrainFunctions = true # VTK norm of B , +#write_materialFunctions = true +#write_prestrainFunctions = true # VTK norm of B , #write_VTK = true diff --git a/microstructure_testsuite/plot.py b/microstructure_testsuite/plot.py index 677a1aafacc74a0c795d1553a56f5f3ef5e7dbc7..00bea1be144d90cba9de68bdde0936277027c235 100644 --- a/microstructure_testsuite/plot.py +++ b/microstructure_testsuite/plot.py @@ -7,6 +7,7 @@ Created on Wed Jul 6 13:17:28 2022 """ import numpy as np import matplotlib.pyplot as plt +import matplotlib.colors as colors from helper_functions import * @@ -50,11 +51,12 @@ elif case==-1: # Read from outputs QFilePath = os.path.dirname(os.getcwd()) + '/outputs/QMatrix.txt' BFilePath = os.path.dirname(os.getcwd())+ '/outputs/BMatrix.txt' Q, B = ReadEffectiveQuantities(QFilePath,BFilePath) + Q=0.5*(np.transpose(Q)+Q) # symmetrize B=np.transpose([B]) # # -length=2 +length=80 N=200 h=length/N E=np.zeros([N,N]) @@ -62,11 +64,9 @@ X=np.zeros([N,N]) Y=np.zeros([N,N]) for i in range(0,N): for j in range(0,N): - x=(i-N/2)*h - y=(j-N/2)*h X[i,j]=(i-N/2)*h Y[i,j]=(j-N/2)*h - K=xytokappaalpha(x,y) + K=xytokappaalpha(X[i,j],Y[i,j]) E[i,j]=energy(K[0],K[1],Q,B) fig = plt.figure(figsize=(7,6)) @@ -75,7 +75,7 @@ ax.set_aspect(1) ax.set_xticks([-length/4,0,length/4]) ax.set_yticks([]) #pcm = plt.pcolor(X,Y,E, norm=colors.LogNorm(vmin=E.min(), vmax=E.max()), cmap='winter', shading='auto') -pcm = plt.pcolor(X,Y,E, norm=colors.PowerNorm(gamma=0.3), cmap='winter', shading='auto') +pcm = plt.pcolor(X,Y,E, norm=colors.PowerNorm(gamma=0.25), cmap='brg') plt.colorbar(pcm, extend='max') #plt.imshow(np.log(E-np.min(E)+0.0001)) # normalize to min = 0 and log scale to emphasize energy landscape # TODO: Beschriftung der Axen sollte von [-h*N/2, h*N/2] sein! diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d099d57b12f37919cd7ff99c02cd62ced6eed32c..3264ac4d2a37798d5f36a236eb6120a32e3f9f5a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,10 +3,7 @@ #set(CMAKE_BUILD_TYPE Debug)# -set(programs Cell-Problem - Cell-Problem_muGamma - Compute_MuGamma - ) +set(programs Cell-Problem) foreach(_program ${programs})