diff --git a/dG3D/benchmarks/multiScaleBodyForce_TgPert/BeamMultiscale.py b/dG3D/benchmarks/multiScaleBodyForce_TgPert/BeamMultiscale.py index 66427fb78cf220b032db1a17c3c140337ba8adb4..47737e2f71780ae280e1731062ab7ac58598c8ce 100644 --- a/dG3D/benchmarks/multiScaleBodyForce_TgPert/BeamMultiscale.py +++ b/dG3D/benchmarks/multiScaleBodyForce_TgPert/BeamMultiscale.py @@ -60,9 +60,9 @@ microSolver.addMicroBC(microBC) #microSolver.pathFollowing(True,0) #microSolver.setPathFollowingControlType(1) -#microSolver.setPathFollowingArcLengthStep(1e-3) +#microSolver.setPathFollowingArcLengthStep(1e-4) -microSolver.snlData(1,1.,2e-5,1e-10) +microSolver.snlData(1,1.,1e-4,1e-5) microSolver.setSystemType(1) microSolver.Solver(2) microSolver.Scheme(1) @@ -70,12 +70,12 @@ microSolver.setSameStateCriterion(1e-16) microSolver.stressAveragingFlag(bool(1)) microSolver.setStressAveragingMethod(0) microSolver.tangentAveragingFlag(bool(1)) -microSolver.setTangentAveragingMethod(0,1e-6) +microSolver.setTangentAveragingMethod(0,1e-4) microSolver.stiffnessModification(bool(1)); microSolver.iterativeProcedure(bool(1)); -MaxIter=15 +MaxIter=25 StepIncrease= 3 StepReducFactor=2. NumberReduction=10 @@ -90,7 +90,7 @@ sol = 2 # Gmm=0 (default) Taucs=1 PETsc=2 soltype =1 # StaticLinear=0 (default) StaticNonLinear=1 nstep = 50 # number of step (used only if soltype=1) ftime =1. # Final time (used only if soltype=1) -tol=2.e-5 # relative tolerance for NR scheme (used only if soltype=1) +tol=1.e-4 # relative tolerance for NR scheme (used only if soltype=1) nstepArch=3 # Number of step between 2 archiving (used only if soltype=1) @@ -115,14 +115,14 @@ mysolver.addMaterialLaw(macromat) #mysolver.setMultiscaleFlag(bool(1)) mysolver.Scheme(soltype) mysolver.Solver(sol) -mysolver.snlData(nstep,ftime,tol) +mysolver.snlData(nstep,ftime,tol,tol/10.) #mysolver.pathFollowing(True,0) #mysolver.setPathFollowingControlType(1) #mysolver.setPathFollowingArcLengthStep(1e-3) #mysolver.setPathFollowingCorrectionMethod(2) -MaxIter=15 +MaxIter=25 StepIncrease= 2 StepReducFactor=2. NumberReduction=10 @@ -155,7 +155,7 @@ mysolver.displacementBC("Edge",1,1,dis) #mysolver.displacementBC("Edge",1,1,0) mysolver.displacementBC("Edge",3,1,-dis) #mysolver.constraintBC("Edge",3,1) -#mysolver.forceBC("Edge",3,1,-0.14e2) +#mysolver.forceBC("Edge",3,1,-0.6e1) #-0.14e2) # archivage mysolver.internalPointBuildView("epsilon_xx",IPField.STRAIN_XX, 1, 1); @@ -178,6 +178,17 @@ mysolver.archivingNodeDisplacement(5,1,1) mysolver.solve() # test check -check = TestCheck() -check.equal(1.947727e+02,mysolver.getArchivedForceOnPhysicalGroup("Edge", 1, 1),1e-3) +try: + import linecache + total_line_number = sum(1 for line in open('force3comp1_part0.csv')) + linedisp = linecache.getline('force3comp1_part0.csv',total_line_number) +except: + print('Cannot read the results in the files') + import os + os._exit(1) +else: + check = TestCheck() + check.equal(-12.5883812447857,float(linedisp.split(';')[1])) + + diff --git a/dG3D/benchmarks/multiScaleBodyForce_TgPert/CMakeLists.txt b/dG3D/benchmarks/multiScaleBodyForce_TgPert/CMakeLists.txt index 1962ddb23aca0cb674d3cf124e991e636e2445b2..46f545031202597f7095d3f76079a7c1476a4587 100644 --- a/dG3D/benchmarks/multiScaleBodyForce_TgPert/CMakeLists.txt +++ b/dG3D/benchmarks/multiScaleBodyForce_TgPert/CMakeLists.txt @@ -9,4 +9,4 @@ set(FILES2DELETE E* ) -add_cm3python_mpi_test(4 ${PYFILE} "${FILES2DELETE}") +add_cm3python_mpi_test(2 ${PYFILE} "${FILES2DELETE}") diff --git a/dG3D/benchmarks/multiScaleBodyForce_TgPert/Sample6_24.geo b/dG3D/benchmarks/multiScaleBodyForce_TgPert/Sample6_24.geo index c9218e75e45fc8b53a8b21b74a04df8d2e11361a..da2d3c1f132bdc53bfb2f41013421cf77ab82901 100644 --- a/dG3D/benchmarks/multiScaleBodyForce_TgPert/Sample6_24.geo +++ b/dG3D/benchmarks/multiScaleBodyForce_TgPert/Sample6_24.geo @@ -29,7 +29,7 @@ Physical Line(3) = {3}; Physical Line(4) = {4}; Physical Point(5)={3}; -Transfinite Line {2,4} = 5 Using Progression 1; +Transfinite Line {2,4} = 3 Using Progression 1; Transfinite Line {1,3} = 2 Using Progression 1; Transfinite Surface {100}; diff --git a/dG3D/benchmarks/multiScaleBodyForce_TgPert/Sample6_24.msh b/dG3D/benchmarks/multiScaleBodyForce_TgPert/Sample6_24.msh index 74e967818f81b0c83f52126f5d459c2ecb14648f..d31507cbb811cedae8e8c111a65db7c3feb987b3 100644 --- a/dG3D/benchmarks/multiScaleBodyForce_TgPert/Sample6_24.msh +++ b/dG3D/benchmarks/multiScaleBodyForce_TgPert/Sample6_24.msh @@ -14,7 +14,7 @@ $Entities 100 -1.000000011686097e-07 -9.999999406318238e-08 -1e-07 59.82000010000001 338.9800001 1e-07 1 51 4 1 2 3 4 $EndEntities $Nodes -9 27 1 27 +9 15 1 15 0 1 0 1 1 0 0 0 @@ -30,76 +30,46 @@ $Nodes 1 1 0 1 5 29.91 0 0 -1 2 0 7 +1 2 0 3 6 7 8 +59.82000000000001 169.4900000000001 0 +59.82000000000001 84.74500000000006 0 +59.82000000000001 254.2350000000001 0 +1 3 0 1 9 +29.91 338.98 0 +1 4 0 3 10 11 12 -59.82000000000001 84.7450000000001 0 -59.82000000000001 169.4900000000001 0 -59.82000000000001 254.2350000000001 0 -59.82000000000001 42.37250000000005 0 -59.82000000000001 127.1175000000001 0 -59.82000000000001 211.8625000000001 0 -59.82000000000001 296.6075000000001 0 -1 3 0 1 +0 169.4899999999999 0 +0 254.235 0 +0 84.74499999999995 0 +2 100 0 3 13 -29.91 338.98 0 -1 4 0 7 14 15 -16 -17 -18 -19 -20 -0 254.2349999999999 0 -0 169.4899999999999 0 -0 84.74499999999992 0 -0 296.6075 0 -0 211.8624999999999 0 -0 127.1174999999999 0 -0 42.37249999999995 0 -2 100 0 7 -21 -22 -23 -24 -25 -26 -27 -29.91 84.745 0 -29.91 42.3725 0 29.91 169.49 0 -29.91 127.1175 0 +29.91 84.745 0 29.91 254.235 0 -29.91 211.8625 0 -29.91 296.6075 0 $EndNodes $Elements -6 15 1 15 +6 9 1 9 0 3 15 1 1 3 1 1 8 1 2 1 2 5 -1 2 8 4 -3 2 6 9 -4 6 7 10 -5 7 8 11 -6 8 3 12 +1 2 8 2 +3 2 6 7 +4 6 3 8 1 3 8 1 -7 3 4 13 -1 4 8 4 -8 4 14 17 -9 14 15 18 -10 15 16 19 -11 16 1 20 -2 100 10 4 -12 1 2 6 16 5 9 21 20 22 -13 16 6 7 15 21 10 23 19 24 -14 15 7 8 14 23 11 25 18 26 -15 14 8 3 4 25 12 13 17 27 +5 3 4 9 +1 4 8 2 +6 4 10 11 +7 10 1 12 +2 100 10 2 +8 1 2 6 10 5 7 13 12 14 +9 10 6 3 4 13 8 9 11 15 $EndElements