diff --git a/geometries/material_neukamm.py b/geometries/material_neukamm.py index ae706749b9ebdaea55d76c3f4aacd1b5a5cf590c..883afefe42b5586b8a4486929d4146a53cd8e040 100644 --- a/geometries/material_neukamm.py +++ b/geometries/material_neukamm.py @@ -6,12 +6,12 @@ import math # x[1] : y2-component # x[2] : x3-component def f(x): - theta=0.25 - factor=0.8 + theta=0.5 + factor=.9 # --- replace with your definition of indicatorFunction: 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-theta): + elif ((abs(x[1]) < factor*theta/2) and x[2]>1/2-factor*theta): return 1 #Phase1 else : return 0 #Phase2 diff --git a/inputs/cellsolver.parset b/inputs/cellsolver.parset index e977338dea22aebe1cf425584d56a7abb79296b6..9e0eb36bde4739ab59202e3708e49418f4a93a24 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=2 2 +numLevels=4 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 diff --git a/microstructure_testsuite/plot.py b/microstructure_testsuite/plot.py index b05ba650864b63a1842ff2b1e641a717912f18ca..677a1aafacc74a0c795d1553a56f5f3ef5e7dbc7 100644 --- a/microstructure_testsuite/plot.py +++ b/microstructure_testsuite/plot.py @@ -54,7 +54,7 @@ elif case==-1: # Read from outputs # # -length=0.05 +length=2 N=200 h=length/N E=np.zeros([N,N]) @@ -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.2), cmap='winter', shading='auto') +pcm = plt.pcolor(X,Y,E, norm=colors.PowerNorm(gamma=0.3), cmap='winter', shading='auto') 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/outputs/Results/1/BMatrix.txt b/outputs/Results/2x2/1/BMatrix.txt similarity index 100% rename from outputs/Results/1/BMatrix.txt rename to outputs/Results/2x2/1/BMatrix.txt diff --git a/outputs/Results/1/QMatrix.txt b/outputs/Results/2x2/1/QMatrix.txt similarity index 100% rename from outputs/Results/1/QMatrix.txt rename to outputs/Results/2x2/1/QMatrix.txt diff --git a/outputs/Results/1/output.txt b/outputs/Results/2x2/1/output.txt similarity index 100% rename from outputs/Results/1/output.txt rename to outputs/Results/2x2/1/output.txt diff --git a/outputs/Results/1/parameter b/outputs/Results/2x2/1/parameter similarity index 100% rename from outputs/Results/1/parameter rename to outputs/Results/2x2/1/parameter diff --git a/outputs/Results/2/BMatrix.txt b/outputs/Results/2x2/2/BMatrix.txt similarity index 100% rename from outputs/Results/2/BMatrix.txt rename to outputs/Results/2x2/2/BMatrix.txt diff --git a/outputs/Results/2/QMatrix.txt b/outputs/Results/2x2/2/QMatrix.txt similarity index 100% rename from outputs/Results/2/QMatrix.txt rename to outputs/Results/2x2/2/QMatrix.txt diff --git a/outputs/Results/2/output.txt b/outputs/Results/2x2/2/output.txt similarity index 100% rename from outputs/Results/2/output.txt rename to outputs/Results/2x2/2/output.txt diff --git a/outputs/Results/2/parameter b/outputs/Results/2x2/2/parameter similarity index 100% rename from outputs/Results/2/parameter rename to outputs/Results/2x2/2/parameter diff --git a/outputs/Results/2x2/3/BMatrix.txt b/outputs/Results/2x2/3/BMatrix.txt new file mode 100644 index 0000000000000000000000000000000000000000..0fb3c029f0d5b544c5143e50eba13984d5eafcb9 --- /dev/null +++ b/outputs/Results/2x2/3/BMatrix.txt @@ -0,0 +1,3 @@ +1 1 -0.0144287202371896055 +1 2 0.014428690223795131 +1 3 -2.0320334857961725e-11 diff --git a/outputs/Results/2x2/3/QMatrix.txt b/outputs/Results/2x2/3/QMatrix.txt new file mode 100644 index 0000000000000000000000000000000000000000..9d8813d5e9119a8465e30a2c344c65f631f07469 --- /dev/null +++ b/outputs/Results/2x2/3/QMatrix.txt @@ -0,0 +1,9 @@ +1 1 12.4813265250416485 +1 2 2.0831795458888962 +1 3 3.83811740666402797e-10 +2 1 2.0831795513179836 +2 2 12.481326525238547 +2 3 1.78942192122814843e-10 +3 1 -6.40561063029264521e-10 +3 2 -1.00945173229121783e-09 +3 3 10.3922965257922275 diff --git a/outputs/Results/2x2/3/output.txt b/outputs/Results/2x2/3/output.txt new file mode 100644 index 0000000000000000000000000000000000000000..215cb327a77feb1fa2f8aaf6bc22fd0475dcbd10 --- /dev/null +++ b/outputs/Results/2x2/3/output.txt @@ -0,0 +1,61 @@ +material_prestrain used: material_neukamm +----- Input Parameters -----: +alpha: 8 +gamma: 1 +theta: 0.25 +beta: 3 +material parameters: +mu1: 1 +mu2: 3 +lambda1: 1 +lambda2: 3 +----------------------------: +Number of Elements in each direction: [4,4,4] +size of FiniteElementBasis: 240 +Solver-type used: CG-Solver +---------- OUTPUT ---------- + -------------------- +Corrector-Matrix M_1: +-0.00922212 -2.49142e-10 0 +-2.49142e-10 -0.00494017 0 +0 0 0 + + -------------------- +Corrector-Matrix M_2: +0.00494016 -2.03726e-10 0 +-2.03726e-10 0.00922211 0 +0 0 0 + + -------------------- +Corrector-Matrix M_3: +1.90697e-10 -4.74653e-11 0 +-4.74653e-11 1.93256e-10 0 +0 0 0 + + -------------------- +Effective Matrix Q: +12.4813 2.08318 3.83812e-10 +2.08318 12.4813 1.78942e-10 +-6.40561e-10 -1.00945e-09 10.3923 + +--- Prestrain Output --- +B_hat: -0.150032 0.150032 -2.16498e-10 +B_eff: -0.0144287 0.0144287 -2.03203e-11 (Effective Prestrain) +------------------------ +q1=12.4813 +q2=12.4813 +q3=10.3923 +q12=2.08318 +b1=-0.0144287 +b2=0.0144287 +b3=-2.03203e-11 +b1_hat: -0.150032 +b2_hat: 0.150032 +b3_hat: -2.16498e-10 +mu_gamma=10.3923 +q_onetwo=2.083180 +--------------------------------------------------------------------------------------------------------- + Levels | q1 | q2 | q3 | b1 | b2 | b3 | +--------------------------------------------------------------------------------------------------------- + 2 & 1.24813e+01 & 1.24813e+01 & 1.03923e+01 & -1.44287e-02 & 1.44287e-02 & -2.03203e-11 & +--------------------------------------------------------------------------------------------------------- diff --git a/outputs/Results/2x2/3/parameter b/outputs/Results/2x2/3/parameter new file mode 100644 index 0000000000000000000000000000000000000000..8fbb9f5a0f9c97c93b6660df92d0f9350247d4ae --- /dev/null +++ b/outputs/Results/2x2/3/parameter @@ -0,0 +1,19 @@ +mu=80 60 +lambda=80 25 +rho=1.0 0 + +#Indicator function that determines both phases +# x[0] : y1-component +# x[1] : y2-component +# x[2] : x3-component +def f(x): + theta=0.5 + factor=1 + # --- replace with your definition of indicatorFunction: + 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): + return 1 #Phase1 + else : + return 0 #Phase2 + diff --git a/outputs/Results/2x2/4/BMatrix.txt b/outputs/Results/2x2/4/BMatrix.txt new file mode 100644 index 0000000000000000000000000000000000000000..be6a7591b543c9271ef26252469614edc90ab472 --- /dev/null +++ b/outputs/Results/2x2/4/BMatrix.txt @@ -0,0 +1,3 @@ +1 1 -2.74206114740746898 +1 2 -3.10270304357049476 +1 3 3.0398257121603124e-09 diff --git a/outputs/Results/2x2/4/QMatrix.txt b/outputs/Results/2x2/4/QMatrix.txt new file mode 100644 index 0000000000000000000000000000000000000000..245d4d77e9d95b5307568245b1265056d655865f --- /dev/null +++ b/outputs/Results/2x2/4/QMatrix.txt @@ -0,0 +1,9 @@ +1 1 14.4975598095779166 +1 2 3.98327256772200711 +1 3 -6.56940620062560124e-09 +2 1 3.98327260564529295 +2 2 14.8275228823281235 +2 3 -6.51275988527633122e-09 +3 1 -2.09762192341099332e-09 +3 2 -1.83361834006557389e-09 +3 3 10.6556275724235974 diff --git a/outputs/Results/2x2/4/output.txt b/outputs/Results/2x2/4/output.txt new file mode 100644 index 0000000000000000000000000000000000000000..d7694ae7b4f2b9b853b0bee11418be39c40517bc --- /dev/null +++ b/outputs/Results/2x2/4/output.txt @@ -0,0 +1,40 @@ +material_prestrain used: material_neukamm +----- Input Parameters -----: +alpha: 8 +gamma: 1 +theta: 0.25 +beta: 3 +material parameters: +mu1: 1 +mu2: 3 +lambda1: 1 +lambda2: 3 +----------------------------: +Number of Elements in each direction: [4,4,4] +size of FiniteElementBasis: 240 +Solver-type used: CG-Solver +---------- OUTPUT ---------- + -------------------- +Corrector-Matrix M_1: +-0.277147 1.10701e-09 0 +1.10701e-09 -0.334813 0 +0 0 0 + + -------------------- +Corrector-Matrix M_2: +-0.478197 8.17764e-10 0 +8.17764e-10 -0.188937 0 +0 0 0 + + -------------------- +Corrector-Matrix M_3: +2.06316e-11 0.115943 0 +0.115943 3.27431e-10 0 +0 0 0 + + -------------------- +Effective Matrix Q: +14.4976 3.98327 -6.56941e-09 +3.98327 14.8275 -6.51276e-09 +-2.09762e-09 -1.83362e-09 10.6556 + diff --git a/outputs/Results/2x2/4/parameter b/outputs/Results/2x2/4/parameter new file mode 100644 index 0000000000000000000000000000000000000000..cbe045d50b73dabf331ba95279ad5081a33a23d6 --- /dev/null +++ b/outputs/Results/2x2/4/parameter @@ -0,0 +1,19 @@ +mu=80 60 +lambda=80 25 +rho=1.0 0 + +#Indicator function that determines both phases +# x[0] : y1-component +# x[1] : y2-component +# x[2] : x3-component +def f(x): + theta=0.5 + factor=0.5 + # --- replace with your definition of indicatorFunction: + 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): + return 1 #Phase1 + else : + return 0 #Phase2 + diff --git a/outputs/Results/4x4/1/BMatrix.txt b/outputs/Results/4x4/1/BMatrix.txt new file mode 100644 index 0000000000000000000000000000000000000000..f9f6228b312b0d3e14135bc1051ff8949504697a --- /dev/null +++ b/outputs/Results/4x4/1/BMatrix.txt @@ -0,0 +1,3 @@ +1 1 0.660848323245719738 +1 2 -0.66084827993852846 +1 3 -6.068513378040036e-10 diff --git a/outputs/Results/4x4/1/QMatrix.txt b/outputs/Results/4x4/1/QMatrix.txt new file mode 100644 index 0000000000000000000000000000000000000000..dc3f2b32cb19c7811c48cceb335c7fda922cc4d4 --- /dev/null +++ b/outputs/Results/4x4/1/QMatrix.txt @@ -0,0 +1,9 @@ +1 1 14.3859585372529803 +1 2 2.77236599298506281 +1 3 -2.42147260956249048e-10 +2 1 2.77236599345047274 +2 2 14.3859585326148895 +2 3 2.60356423062366068e-08 +3 1 7.61360853362081604e-10 +3 2 5.6448884340256504e-10 +3 3 11.4617831133878436 diff --git a/outputs/Results/4x4/1/parameter b/outputs/Results/4x4/1/parameter new file mode 100644 index 0000000000000000000000000000000000000000..dc094c074120dca2611fa1edcba720f5e30a7fc0 --- /dev/null +++ b/outputs/Results/4x4/1/parameter @@ -0,0 +1,15 @@ +mu=80 60 +lambda=80 25 +rho=1.0 0 + +def f(x): + theta=0.5 + factor=1 + # --- replace with your definition of indicatorFunction: + 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): + return 1 #Phase1 + else : + return 0 #Phase2 + diff --git a/outputs/Results/4x4/2/BMatrix.txt b/outputs/Results/4x4/2/BMatrix.txt new file mode 100644 index 0000000000000000000000000000000000000000..70af8f44fc7c98640ae2eb72101d5754234c72c6 --- /dev/null +++ b/outputs/Results/4x4/2/BMatrix.txt @@ -0,0 +1,3 @@ +1 1 0.44108759919650381 +1 2 -0.849701612828117514 +1 3 1.21280778469193972e-10 diff --git a/outputs/Results/4x4/2/QMatrix.txt b/outputs/Results/4x4/2/QMatrix.txt new file mode 100644 index 0000000000000000000000000000000000000000..a7de0e2d25fbb58d8969883c6dd6c08a9c853a98 --- /dev/null +++ b/outputs/Results/4x4/2/QMatrix.txt @@ -0,0 +1,9 @@ +1 1 14.2867186772455206 +1 2 2.75022913560156557 +1 3 -9.16110146344798329e-08 +2 1 2.75022913428882676 +2 2 14.3273497791238853 +2 3 -2.0330618105908734e-08 +3 1 8.45189208141952012e-10 +3 2 7.32785036249211903e-10 +3 3 11.4128457014374884 diff --git a/outputs/Results/4x4/2/parameter b/outputs/Results/4x4/2/parameter new file mode 100644 index 0000000000000000000000000000000000000000..0f7d8246f032d5b557c68a9b5cd603b64033db81 --- /dev/null +++ b/outputs/Results/4x4/2/parameter @@ -0,0 +1,15 @@ +mu=80 60 +lambda=80 25 +rho=1.0 0 + +def f(x): + theta=0.5 + factor=.9 + # --- replace with your definition of indicatorFunction: + 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): + return 1 #Phase1 + else : + return 0 #Phase2 +