[FEM] Elmer examples: use better names for constraints

fixes a ToDo and the unit tests work fine nevertheless
This commit is contained in:
Uwe
2022-03-26 01:46:54 +01:00
parent d286b52b57
commit 2e8fc8e477
2 changed files with 5 additions and 8 deletions

View File

@@ -129,15 +129,14 @@ def setup(doc=None, solvertype="elmer"):
analysis.addObject(material_obj)
# constraint potential 1st
name_pot1 = "ConstraintElectrostaticPotential001"
name_pot1 = "ElectrostaticPotential1"
con_elect_pot1 = ObjectsFem.makeConstraintElectrostaticPotential(doc, name_pot1)
con_elect_pot1.References = [(geom_obj, "Face1")]
con_elect_pot1.ElectricInfinity = True
analysis.addObject(con_elect_pot1)
# constraint potential 2nd
# TODO: use a better name for the constraint, but unit test needs to be changed
name_pot2 = "ConstraintElectrostaticPotential001"
name_pot2 = "ElectrostaticPotential2"
con_elect_pot2 = ObjectsFem.makeConstraintElectrostaticPotential(doc, name_pot2)
con_elect_pot2.References = [(geom_obj, "Face2")]
con_elect_pot2.CapacitanceBody = 1
@@ -145,8 +144,7 @@ def setup(doc=None, solvertype="elmer"):
analysis.addObject(con_elect_pot2)
# constraint potential 3rd
# TODO: use a better name for the constraint, but unit test needs to be changed
name_pot3 = "ConstraintElectrostaticPotential002"
name_pot3 = "ElectrostaticPotential3"
con_elect_pot3 = ObjectsFem.makeConstraintElectrostaticPotential(doc, name_pot3)
con_elect_pot3.References = [(geom_obj, "Face3")]
con_elect_pot3.CapacitanceBody = 2

View File

@@ -187,7 +187,7 @@ def setup(doc=None, solvertype="elmer"):
analysis.addObject(material_obj)
# constraint potential 0V
name_pot1 = "ConstraintElectrostaticPotential"
name_pot1 = "ElectrostaticPotential1"
con_elect_pot1 = ObjectsFem.makeConstraintElectrostaticPotential(doc, name_pot1)
con_elect_pot1.References = [(geom_obj, "Face2")]
con_elect_pot1.Potential = 0.00
@@ -197,8 +197,7 @@ def setup(doc=None, solvertype="elmer"):
analysis.addObject(con_elect_pot1)
# constraint potential 1V
# TODO: use a better name for the constraint, but unit test needs to be changed
name_pot2 = "ConstraintElectrostaticPotential001"
name_pot2 = "ElectrostaticPotential2"
con_elect_pot2 = ObjectsFem.makeConstraintElectrostaticPotential(doc, name_pot2)
con_elect_pot2.References = [
(geom_obj, "Face4"),