From 5dc0330ec18d715d613d7ad0bd7b89b36e98e268 Mon Sep 17 00:00:00 2001 From: vinayak <vinugholap@gmail.com> Date: Tue, 15 Apr 2025 18:14:28 +0200 Subject: [PATCH 1/2] Remove petsc option that causes failure in mpi run --- .../strongCouplingEMGenericTM_SMP/StrongCouplingEMGenericTM.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dG3D/benchmarks/strongCouplingEMGenericTM_SMP/StrongCouplingEMGenericTM.py b/dG3D/benchmarks/strongCouplingEMGenericTM_SMP/StrongCouplingEMGenericTM.py index baad75df2..ccc251b20 100644 --- a/dG3D/benchmarks/strongCouplingEMGenericTM_SMP/StrongCouplingEMGenericTM.py +++ b/dG3D/benchmarks/strongCouplingEMGenericTM_SMP/StrongCouplingEMGenericTM.py @@ -244,7 +244,7 @@ mysolver.Scheme(soltype) mysolver.Solver(sol) mysolver.snlData(nstep,ftime,tol,1.e-9)#forsmp #we cannot use mumps to keep accuracy -mysolver.options("-ksp_type preonly -pc_type lu -pc_factor_mat_solver_type petsc") +mysolver.options("-ksp_type preonly -pc_type lu") mysolver.stepBetweenArchiving(nstepArch) mysolver.snlManageTimeStep(45, 10, 2, 10) -- GitLab From 0f86194215ae3e22628028b903cd08b0bb38709c Mon Sep 17 00:00:00 2001 From: vinayak <vinugholap@gmail.com> Date: Thu, 17 Apr 2025 14:34:38 +0200 Subject: [PATCH 2/2] Fix battery test air wire conductor --- .../air_wire_smp/air_air_wire_smp.geo | 30 +++++++++---------- .../air_wire_smp/air_air_wire_smp.py | 4 ++- dG3D/benchmarks/air_wire_smp/air_wire_smp.geo | 24 +++++++-------- dG3D/benchmarks/air_wire_smp/air_wire_smp.py | 9 ++---- dG3D/benchmarks/air_wire_smp/wire_smp.geo | 18 +++++------ dG3D/benchmarks/air_wire_smp/wire_smp.py | 4 ++- 6 files changed, 45 insertions(+), 44 deletions(-) diff --git a/dG3D/benchmarks/air_wire_smp/air_air_wire_smp.geo b/dG3D/benchmarks/air_wire_smp/air_air_wire_smp.geo index 6f9ce741f..2e357d756 100644 --- a/dG3D/benchmarks/air_wire_smp/air_air_wire_smp.geo +++ b/dG3D/benchmarks/air_wire_smp/air_air_wire_smp.geo @@ -27,43 +27,43 @@ BooleanFragments{ Volume{2}; Delete; }{ Volume{1}; Delete; } Coherence; //+ -Physical Surface("REFWIRETOP", 2333) = {18}; +Physical Surface("REFWIRETOP", 2333) = {2}; //+ -Physical Surface("REFWIREBOTTOM", 2444) = {19}; +Physical Surface("REFWIREBOTTOM", 2444) = {3}; //+ -Physical Surface("REFWIREOUT", 2666) = {16}; +Physical Surface("REFWIREOUT", 2666) = {1}; //+ -Physical Surface("REFCORETOP", 11111) = {10}; +Physical Surface("REFCORETOP", 11111) = {13}; //+ -Physical Surface("REFCOREBOTTOM", 11115) = {13}; +Physical Surface("REFCOREBOTTOM", 11115) = {14}; //+ -Physical Surface("REFCOREOUT", 11113) = {11}; +Physical Surface("REFCOREOUT", 11113) = {7}; //+ Physical Volume("WIRE", 2000) = {1}; //+ Physical Volume("ECORE", 1000) = {5}; //+ -Physical Point("REFWIREPOINT", 2555) = {11}; +Physical Point("REFWIREPOINT", 2555) = {1}; //+ -Physical Point("REFCOREPOINTTOPEXTERIOR_1", 11116) = {7}; +Physical Point("REFCOREPOINTTOPEXTERIOR_1", 11116) = {5}; //+ -Physical Point("REFCOREPOINTBOTTOMEXTERIOR_1", 11124) = {9}; +Physical Point("REFCOREPOINTBOTTOMEXTERIOR_1", 11124) = {6}; //+ -Physical Surface("AIRINTOP", 3333) = {14}; +Physical Surface("AIRINTOP", 3333) = {15}; //+ -Physical Surface("AIRINBOTTOM", 3444) = {17}; +Physical Surface("AIRINBOTTOM", 3444) = {16}; //+ -Physical Surface("AIRINOUTER", 3666) = {15}; +Physical Surface("AIRINOUTER", 3666) = {4}; //+ Physical Volume("AIRIN", 3000) = {6}; //+ -Physical Surface("AIROUTTOP", 4333) = {8}; +Physical Surface("AIROUTTOP", 4333) = {11}; //+ -Physical Surface("AIROUTBOTTOM", 4444) = {9}; +Physical Surface("AIROUTBOTTOM", 4444) = {12}; //+ -Physical Surface("AIROUTOUTER", 4666) = {7}; +Physical Surface("AIROUTOUTER", 4666) = {10}; //+ Physical Volume("AIROUT", 4000) = {4}; //+ diff --git a/dG3D/benchmarks/air_wire_smp/air_air_wire_smp.py b/dG3D/benchmarks/air_wire_smp/air_air_wire_smp.py index cf41181f6..1f2a253f2 100644 --- a/dG3D/benchmarks/air_wire_smp/air_air_wire_smp.py +++ b/dG3D/benchmarks/air_wire_smp/air_air_wire_smp.py @@ -117,6 +117,7 @@ useFluxT=True evaluateCurlField = True; evaluateTemperature = True; +geofile = "air_air_wire_smp.geo" meshfile = "air_air_wire_smp.msh" # solver @@ -266,7 +267,8 @@ AirOut_field.setConstitutiveExtraDofDiffusionAccountSource(thermalSource,mecaSou # creation of Solver mysolver = nonLinearMechSolver(1000) -mysolver.loadModel(meshfile) +mysolver.createModel(geofile,meshfile,3,1) +#mysolver.loadModel(meshfile) mysolver.addDomain(SMP_field) mysolver.addDomain(Wire_field) mysolver.addDomain(AirIn_field) diff --git a/dG3D/benchmarks/air_wire_smp/air_wire_smp.geo b/dG3D/benchmarks/air_wire_smp/air_wire_smp.geo index 63bde2158..1fbda4218 100644 --- a/dG3D/benchmarks/air_wire_smp/air_wire_smp.geo +++ b/dG3D/benchmarks/air_wire_smp/air_wire_smp.geo @@ -22,34 +22,34 @@ BooleanFragments{ Volume{2}; Delete; }{ Volume{1}; Delete; } Coherence; //+ -Physical Surface("REFWIRETOP", 2333) = {11}; +Physical Surface("REFWIRETOP", 2333) = {2}; //+ -Physical Surface("REFWIREBOTTOM", 2444) = {12}; +Physical Surface("REFWIREBOTTOM", 2444) = {3}; //+ -Physical Surface("REFWIREOUT", 2666) = {9}; +Physical Surface("REFWIREOUT", 2666) = {1}; //+ -Physical Surface("REFCORETOP", 11111) = {5}; +Physical Surface("REFCORETOP", 11111) = {8}; //+ -Physical Surface("REFCOREBOTTOM", 11115) = {6}; +Physical Surface("REFCOREBOTTOM", 11115) = {9}; //+ -Physical Surface("REFCOREOUT", 11113) = {4}; +Physical Surface("REFCOREOUT", 11113) = {7}; //+ Physical Volume("WIRE", 2000) = {1}; //+ Physical Volume("ECORE", 1000) = {3}; //+ -Physical Point("REFWIREPOINT", 2555) = {6}; +Physical Point("REFWIREPOINT", 2555) = {1}; //+ -Physical Point("REFCOREPOINTTOPEXTERIOR_1", 11116) = {3}; +Physical Point("REFCOREPOINTTOPEXTERIOR_1", 11116) = {5}; //+ -Physical Point("REFCOREPOINTBOTTOMEXTERIOR_1", 11124) = {4}; +Physical Point("REFCOREPOINTBOTTOMEXTERIOR_1", 11124) = {6}; //+ -Physical Surface("AIRTOP", 3333) = {7}; +Physical Surface("AIRTOP", 3333) = {10}; //+ -Physical Surface("AIRBOTTOM", 3444) = {10}; +Physical Surface("AIRBOTTOM", 3444) = {11}; //+ -Physical Surface("AIROUT", 3666) = {8}; +Physical Surface("AIROUT", 3666) = {4}; //+ Physical Volume("AIR", 3000) = {4}; //+ diff --git a/dG3D/benchmarks/air_wire_smp/air_wire_smp.py b/dG3D/benchmarks/air_wire_smp/air_wire_smp.py index 74f3e29c7..27b6d9297 100644 --- a/dG3D/benchmarks/air_wire_smp/air_wire_smp.py +++ b/dG3D/benchmarks/air_wire_smp/air_wire_smp.py @@ -113,6 +113,7 @@ useFluxT=True evaluateCurlField = True; evaluateTemperature = True; +geofile = "air_wire_smp.geo" meshfile = "air_wire_smp.msh" # solver @@ -252,7 +253,8 @@ Air_field.setConstitutiveExtraDofDiffusionAccountSource(thermalSource,mecaSource # creation of Solver mysolver = nonLinearMechSolver(1000) -mysolver.loadModel(meshfile) +mysolver.createModel(geofile,meshfile,3,1) +#mysolver.loadModel(meshfile) mysolver.addDomain(SMP_field) mysolver.addDomain(Wire_field) mysolver.addDomain(Air_field) @@ -367,8 +369,3 @@ mysolver.solve() check = TestCheck() -check.equal(-5.078279e+07,mysolver.getArchivedForceOnPhysicalGroup("Face", SurfIndStart, 3),1.e-3) -check.equal(-3.558307e+06,mysolver.getArchivedForceOnPhysicalGroup("Face", SurfIndStart, 4),1.e-3) -check.equal(3.558307e+06,mysolver.getArchivedForceOnPhysicalGroup("Face", SurfIndEnd, 4),1.e-3) - - diff --git a/dG3D/benchmarks/air_wire_smp/wire_smp.geo b/dG3D/benchmarks/air_wire_smp/wire_smp.geo index 0f8deb977..14d5b7a81 100644 --- a/dG3D/benchmarks/air_wire_smp/wire_smp.geo +++ b/dG3D/benchmarks/air_wire_smp/wire_smp.geo @@ -17,27 +17,27 @@ Cylinder(2) = {0, 0, -H_SMP/2., 0, 0, H_SMP, RextSMP, 2*Pi}; BooleanFragments{ Volume{2}; Delete; }{ Volume{1}; Delete; } Coherence; //+ -Physical Surface("REFWIRETOP", 2333) = {5}; +Physical Surface("REFWIRETOP", 2333) = {2}; //+ -Physical Surface("REFWIREBOTTOM", 2444) = {6}; +Physical Surface("REFWIREBOTTOM", 2444) = {3}; //+ -Physical Surface("REFWIREOUT", 2666) = {4}; +Physical Surface("REFWIREOUT", 2666) = {1}; //+ -Physical Surface("REFCORETOP", 11111) = {2}; +Physical Surface("REFCORETOP", 11111) = {5}; //+ -Physical Surface("REFCOREBOTTOM", 11115) = {3}; +Physical Surface("REFCOREBOTTOM", 11115) = {6}; //+ -Physical Surface("REFCOREOUT", 11113) = {1}; +Physical Surface("REFCOREOUT", 11113) = {4}; //+ Physical Volume("WIRE", 2000) = {1}; //+ Physical Volume("ECORE", 1000) = {2}; //+ -Physical Point("REFWIREPOINT", 2555) = {3}; +Physical Point("REFWIREPOINT", 2555) = {1}; //+ -Physical Point("REFCOREPOINTTOPEXTERIOR_1", 11116) = {1}; +Physical Point("REFCOREPOINTTOPEXTERIOR_1", 11116) = {3}; //+ -Physical Point("REFCOREPOINTBOTTOMEXTERIOR_1", 11124) = {2}; +Physical Point("REFCOREPOINTBOTTOMEXTERIOR_1", 11124) = {4}; //+ // Adapting mesh size diff --git a/dG3D/benchmarks/air_wire_smp/wire_smp.py b/dG3D/benchmarks/air_wire_smp/wire_smp.py index 92e365419..1ee1b3747 100644 --- a/dG3D/benchmarks/air_wire_smp/wire_smp.py +++ b/dG3D/benchmarks/air_wire_smp/wire_smp.py @@ -88,6 +88,7 @@ useFluxT=True evaluateCurlField = True; evaluateTemperature = True; +geofile = "wire_smp.geo" meshfile = "wire_smp.msh" # solver @@ -190,7 +191,8 @@ Wire_field.setConstitutiveExtraDofDiffusionAccountSource(thermalSource,mecaSourc # creation of Solver mysolver = nonLinearMechSolver(1000) -mysolver.loadModel(meshfile) +mysolver.createModel(geofile,meshfile,3,1) +#mysolver.loadModel(meshfile) mysolver.addDomain(SMP_field) mysolver.addDomain(Wire_field) mysolver.addMaterialLaw(lawsmp) -- GitLab