From 613b29a28ee515b84c31e501eccc7754571ad72e Mon Sep 17 00:00:00 2001 From: marioalexis Date: Wed, 5 Mar 2025 11:44:24 -0300 Subject: [PATCH 1/2] Fem: Fix direction of current density symbol --- .../Fem/Gui/Resources/symbols/ConstraintCurrentDensity.iv | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Fem/Gui/Resources/symbols/ConstraintCurrentDensity.iv b/src/Mod/Fem/Gui/Resources/symbols/ConstraintCurrentDensity.iv index d231f0b9de..b69e26190b 100644 --- a/src/Mod/Fem/Gui/Resources/symbols/ConstraintCurrentDensity.iv +++ b/src/Mod/Fem/Gui/Resources/symbols/ConstraintCurrentDensity.iv @@ -32,8 +32,12 @@ Separator { Separator { + Rotation { + rotation 1 0 0 3.1415927 + + } Translation { - translation 0 3.3333334 0 + translation 0 -0.66666669 0 } Cone { bottomRadius 0.66666669 From 8ed98ab27fe0cc29866c528360c61ad474d36b57 Mon Sep 17 00:00:00 2001 From: marioalexis Date: Wed, 5 Mar 2025 11:44:59 -0300 Subject: [PATCH 2/2] Fem: Add nonlinear options to static current solver --- src/Mod/Fem/femsolver/elmer/equations/staticcurrent.py | 6 +++--- .../Fem/femsolver/elmer/equations/staticcurrent_writer.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Fem/femsolver/elmer/equations/staticcurrent.py b/src/Mod/Fem/femsolver/elmer/equations/staticcurrent.py index 79b9393c10..bda914f9bc 100644 --- a/src/Mod/Fem/femsolver/elmer/equations/staticcurrent.py +++ b/src/Mod/Fem/femsolver/elmer/equations/staticcurrent.py @@ -30,14 +30,14 @@ __url__ = "https://www.freecad.org" from femtools import femutils from ... import equationbase -from . import linear +from . import nonlinear def create(doc, name="StaticCurrent"): return femutils.createObject(doc, name, Proxy, ViewProxy) -class Proxy(linear.Proxy, equationbase.StaticCurrentProxy): +class Proxy(nonlinear.Proxy, equationbase.StaticCurrentProxy): Type = "Fem::EquationElmerStaticCurrent" @@ -83,7 +83,7 @@ class Proxy(linear.Proxy, equationbase.StaticCurrentProxy): obj.addProperty("App::PropertyPower", "Power", "StaticCurrent", "Power control value") -class ViewProxy(linear.ViewProxy, equationbase.StaticCurrentViewProxy): +class ViewProxy(nonlinear.ViewProxy, equationbase.StaticCurrentViewProxy): pass diff --git a/src/Mod/Fem/femsolver/elmer/equations/staticcurrent_writer.py b/src/Mod/Fem/femsolver/elmer/equations/staticcurrent_writer.py index edb35d1fbb..af7c88364c 100644 --- a/src/Mod/Fem/femsolver/elmer/equations/staticcurrent_writer.py +++ b/src/Mod/Fem/femsolver/elmer/equations/staticcurrent_writer.py @@ -40,7 +40,7 @@ class SCwriter: def getStaticCurrentSolver(self, equation): # output the equation parameters - s = self.write.createLinearSolver(equation) + s = self.write.createNonlinearSolver(equation) s["Equation"] = "Stat Current Solver" s["Procedure"] = sifio.FileAttr("StatCurrentSolve/StatCurrentSolver") s["Variable"] = self.write.getUniqueVarName("Potential")