Loading SubKit/build/Model.py +12 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,9 @@ class Model: # Modeling options me.enableEntrainment = False # System model options (TRACE, TRANSFORM opts) me.extSystemModel = {} # Edit options me.editOptions = collections.OrderedDict() me.editOptions["rod_edits"] = False Loading Loading @@ -1355,6 +1358,15 @@ class Model: me.conductorOptions[name]['value'] = value me.conductorOptions[name]['set'] = True def setExtSystemOptions(me, fmuUnzipDir=''): """Set the external system code model options. Args: fmuUnzipDir: Directory housing a Functional Mock Up Unit (FMU) system model. See: TRANSFORM ORNL documentation. """ me.extSystemModel['fmu_unzip_directory'] = fmuUnzipDir def setEditOptions(me, chanVTK=None, rodVTK=None, ctfHDF5=None, veracsHDF5=None, chanASCII=None, rodEdits=None, dnbEdits=None): """Set the code output options. Loading SubKit/build/genDeck.py +4 −2 Original line number Diff line number Diff line Loading @@ -147,16 +147,18 @@ def writeDeck(model, filename): group1Data.append( "**GTP(1) VFRAC(3) GTP(2) VFRAC(4) GTP(3) VFRAC(5) GTP(4) VFRAC(6)\n") group1Data.append(" air 0.0001\n") if model.editOptions['hdf5'] == True and model.is_nodal: group1Data.append("*Card 1.5\n") if model.editOptions['hdf5'] == True and model.is_nodal: group1Data.append(" {nodal_model} .true.\n") if irfc == 5: group1Data.append("*Card 1.5\n") group1Data.append("** A B C\n") group1Data.append("{:12.4e}{:12.4e}{:12.4e}\n".format( model.frictionModel['options']['A'], model.frictionModel['options']['B'], model.frictionModel['options']['C'])) if model.betaHTC is not None: group1Data.append("{{beta_htc}} {:15.3e}\n".format(model.betaHTC)) if model.extSystemModel.get('fmu_unzip_directory', ''): group1Data.append(" {fmu_unzip_directory} " + \ model.extSystemModel['fmu_unzip_directory'] + "\n") # The Card Group 2 data to be written to the deck group2Data = [] Loading Loading
SubKit/build/Model.py +12 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,9 @@ class Model: # Modeling options me.enableEntrainment = False # System model options (TRACE, TRANSFORM opts) me.extSystemModel = {} # Edit options me.editOptions = collections.OrderedDict() me.editOptions["rod_edits"] = False Loading Loading @@ -1355,6 +1358,15 @@ class Model: me.conductorOptions[name]['value'] = value me.conductorOptions[name]['set'] = True def setExtSystemOptions(me, fmuUnzipDir=''): """Set the external system code model options. Args: fmuUnzipDir: Directory housing a Functional Mock Up Unit (FMU) system model. See: TRANSFORM ORNL documentation. """ me.extSystemModel['fmu_unzip_directory'] = fmuUnzipDir def setEditOptions(me, chanVTK=None, rodVTK=None, ctfHDF5=None, veracsHDF5=None, chanASCII=None, rodEdits=None, dnbEdits=None): """Set the code output options. Loading
SubKit/build/genDeck.py +4 −2 Original line number Diff line number Diff line Loading @@ -147,16 +147,18 @@ def writeDeck(model, filename): group1Data.append( "**GTP(1) VFRAC(3) GTP(2) VFRAC(4) GTP(3) VFRAC(5) GTP(4) VFRAC(6)\n") group1Data.append(" air 0.0001\n") if model.editOptions['hdf5'] == True and model.is_nodal: group1Data.append("*Card 1.5\n") if model.editOptions['hdf5'] == True and model.is_nodal: group1Data.append(" {nodal_model} .true.\n") if irfc == 5: group1Data.append("*Card 1.5\n") group1Data.append("** A B C\n") group1Data.append("{:12.4e}{:12.4e}{:12.4e}\n".format( model.frictionModel['options']['A'], model.frictionModel['options']['B'], model.frictionModel['options']['C'])) if model.betaHTC is not None: group1Data.append("{{beta_htc}} {:15.3e}\n".format(model.betaHTC)) if model.extSystemModel.get('fmu_unzip_directory', ''): group1Data.append(" {fmu_unzip_directory} " + \ model.extSystemModel['fmu_unzip_directory'] + "\n") # The Card Group 2 data to be written to the deck group2Data = [] Loading