Commit 8fc83250 authored by John Tourtellott's avatar John Tourtellott

Begin writing induction heating namelists

* Adds ALTMESH, ELECTROMAGNETICS, COIL name lists
* Also comments out the currently-unused namelists
parent 257a5fbc
This diff is collapsed.
......@@ -83,7 +83,7 @@
</Categories>
<DefaultValue>500</DefaultValue>
</Int>
<Double Name="num etasq" Label="Num Etasq" AdvanceLevel="1" Version="0">
<Double Name="num-etasq" Label="Num Etasq" AdvanceLevel="1" Version="0">
<BriefDescription>Used for the displacement current coefficient in the lower-frequency,nondimensional scaling of Maxwell's equations, when its value exceeds the physical value.</BriefDescription>
<Categories>
<Cat>Induction Heating</Cat>
......@@ -99,7 +99,7 @@
</Categories>
<DefaultValue>20</DefaultValue>
</Int>
<Double Name="ss-stopping-distance" Label="SS Stopping Distance" AdvanceLevel="1" Version="0">
<Double Name="ss-stopping-tolerance" Label="SS Stopping Tolerance" AdvanceLevel="1" Version="0">
<Categories>
<Cat>Induction Heating</Cat>
</Categories>
......
......@@ -69,7 +69,7 @@ SMTK_AttributeResource(Version="3")
Categories #[Cat Induction Heating]
DefaultValue 500
Double(Name="num etasq" Label="Num Etasq" AdvanceLevel="1" Version="0")
Double(Name="num-etasq" Label="Num Etasq" AdvanceLevel="1" Version="0")
BriefDescription Used for the displacement current coefficient in the lower-frequency,
| nondimensional scaling of Maxwell's equations, when its value exceeds the physical value.
Categories #[Cat Induction Heating]
......@@ -81,7 +81,7 @@ SMTK_AttributeResource(Version="3")
Categories #[Cat Induction Heating]
DefaultValue 20
Double(Name="ss-stopping-distance" Label="SS Stopping Distance" AdvanceLevel="1" Version="0")
Double(Name="ss-stopping-tolerance" Label="SS Stopping Tolerance" AdvanceLevel="1" Version="0")
Categories #[Cat Induction Heating]
DefaultValue 0.01
......
......@@ -34,6 +34,7 @@ BC_INFLOW = 'bc-inflow'
VOID_MATERIAL = 'void' # (must match material/material-type item)
ENCLOSURE_RADIATION = 'enclosure-radiation'
MOVING_RADIATION = 'moving-radiation'
INDUCTION_HEATING = 'induction heating'
# ---------------------------------------------------------------------
class Writer:
......@@ -41,7 +42,9 @@ class Writer:
'''
# ---------------------------------------------------------------------
def __init__(self, operator_spec, logger, mesh_filename='NOT-FOUND'):
def __init__(self, operator_spec, logger,
mesh_filename='NOT-FOUND',
altmesh_filename='NOT-FOUND'):
'''
'''
self.sim_atts = smtk.attribute.Resource.CastTo(operator_spec.find('attributes').value())
......@@ -69,6 +72,7 @@ class Writer:
# key = material att id; value = output material_number
self.material_number_dict = dict()
self.mesh_file = mesh_filename
self.altmesh_file = altmesh_filename
self.namelist_sequence = list()
self.out = None
......@@ -188,12 +192,18 @@ class Writer:
att_list = self.sim_atts.findAttributes(namelist.att_type)
mesh_att = att_list[0]
mesh_comment = None
for card in format_list:
if not card.is_custom:
card.write(self.out, mesh_att)
elif 'mesh_file' == card.keyword:
mesh_filename = os.path.basename(self.mesh_file)
CardFormat.write_value(self.out, card.keyword, mesh_filename)
mesh_comment = self.mesh_file
elif 'altmesh_file' == card.keyword:
mesh_filename = os.path.basename(self.altmesh_file)
CardFormat.write_value(self.out, card.keyword, mesh_filename)
mesh_comment = self.altmesh_file
elif 'interface_side_sets' == card.keyword:
if self.interface_set_ids:
side_set_string = ','.join([str(x) for x in self.interface_set_ids])
......@@ -202,9 +212,9 @@ class Writer:
self._finish_namelist()
if self.mesh_file:
if mesh_comment:
self.out.write('* Mesh file on local file system at:\n')
self.out.write('* {}\n'.format(self.mesh_file))
self.out.write('* {}\n'.format(mesh_comment))
# ---------------------------------------------------------------------
def _write_physics(self, namelist, format_list):
......@@ -861,9 +871,9 @@ class Writer:
ih_item = ht_item.find(IH)
if ih_item.isEnabled():
CardFormat.Conditions.add(INDUCTION_HEATING)
self.analyses.append(IH)
category_set |= self.sim_atts.analysisCategories(IH)
raise RuntimeError('Induction Heating selected but NOT yet supported')
if ff_item.isEnabled():
CardFormat.Conditions.add(FLOW_ANALYSIS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment