[FEM] use magnetization constraint for 2D
- uses the constraint for 2D magnetodynamics to perform e.g. Elmer's tutorial non. 15 - modify the Material manager to get rid of magnetization but keep the vectorial functionality because in future there will be support for e.g. birefringence materials etc.
This commit is contained in:
@@ -682,15 +682,12 @@ def matProperWidget(parent=None, matproperty=None, Type="String", Value=None,
|
||||
# for properties with an underscored number (vectorial values),
|
||||
# we must strip the part after the first underscore to obtain the bound unit
|
||||
# since in cardutils.py in def get_material_template
|
||||
# the underscores were removed, we must first check for numbers
|
||||
# and then for "Im" (denotes an imaginery value)
|
||||
# the underscores were removed, we must check for numbers
|
||||
import re
|
||||
if re.search(r'\d', matproperty):
|
||||
matpropertyNum = matproperty.rstrip('0123456789')
|
||||
matproperty = matpropertyNum
|
||||
if matproperty.find("Im") != -1:
|
||||
matproperty = matproperty.split("Im")[0]
|
||||
|
||||
|
||||
if hasattr(FreeCAD.Units, matproperty):
|
||||
unit = getattr(FreeCAD.Units, matproperty)
|
||||
quantity = FreeCAD.Units.Quantity(1, unit)
|
||||
|
||||
@@ -123,15 +123,6 @@ ElectricalConductivity =
|
||||
; https://en.wikipedia.org/wiki/Permeability_(electromagnetism)
|
||||
RelativePermeability =
|
||||
|
||||
; The magnetization in [FreeCAD Magnetization unit]"
|
||||
; https://en.wikipedia.org/wiki/Magnetization
|
||||
Magnetization_1 =
|
||||
Magnetization_2 =
|
||||
Magnetization_3 =
|
||||
Magnetization_Im_1 =
|
||||
Magnetization_Im_2 =
|
||||
Magnetization_Im_3 =
|
||||
|
||||
[Architectural]
|
||||
; Description to be updated
|
||||
Color =
|
||||
|
||||
@@ -168,30 +168,6 @@
|
||||
Type: 'Float'
|
||||
URL: 'https://en.wikipedia.org/wiki/Permeability_(electromagnetism)'
|
||||
Description: "The ratio to the permeability of the vacuum"
|
||||
Magnetization_1:
|
||||
Type: 'Quantity'
|
||||
URL: 'https://en.wikipedia.org/wiki/Magnetization'
|
||||
Description: "Magnetization in x-direction in [FreeCAD Magnetization unit]"
|
||||
Magnetization_2:
|
||||
Type: 'Quantity'
|
||||
URL: 'https://en.wikipedia.org/wiki/Magnetization'
|
||||
Description: "Magnetization in y-direction in [FreeCAD Magnetization unit]"
|
||||
Magnetization_3:
|
||||
Type: 'Quantity'
|
||||
URL: 'https://en.wikipedia.org/wiki/Magnetization'
|
||||
Description: "Magnetization in z-direction in [FreeCAD Magnetization unit]"
|
||||
Magnetization_Im_1:
|
||||
Type: 'Quantity'
|
||||
URL: 'https://en.wikipedia.org/wiki/Magnetization'
|
||||
Description: "Magnetization, imagaginary part, in x-direction in [FreeCAD Magnetization unit]"
|
||||
Magnetization_Im_2:
|
||||
Type: 'Quantity'
|
||||
URL: 'https://en.wikipedia.org/wiki/Magnetization'
|
||||
Description: "Magnetization, imagaginary part, in y-direction in [FreeCAD Magnetization unit]"
|
||||
Magnetization_Im_3:
|
||||
Type: 'Quantity'
|
||||
URL: 'https://en.wikipedia.org/wiki/Magnetization'
|
||||
Description: "Magnetization, imagaginary part, in z-direction in [FreeCAD Magnetization unit]"
|
||||
- Architectural:
|
||||
Color:
|
||||
Type: 'String'
|
||||
|
||||
@@ -239,9 +239,6 @@ def get_material_template(withSpaces=False):
|
||||
new_proper = re.sub(r"(\w)([A-Z]+)", r"\1 \2", proper)
|
||||
# strip underscores of vectorial properties
|
||||
new_proper = new_proper.replace("_", " ")
|
||||
# this can lead to double spaces for imaginary properties
|
||||
# e.g. "_Im_1", therefore remove one
|
||||
new_proper = new_proper.replace(" ", " ")
|
||||
new_group[gg][new_proper] = group[gg][proper]
|
||||
new_template.append(new_group)
|
||||
template_data = new_template
|
||||
|
||||
Reference in New Issue
Block a user