Commit f539da51 authored by Salko Jr, Robert's avatar Salko Jr, Robert
Browse files

Add ability to toggle entrainment/de-entrainment

parent 9f7093ea
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -95,6 +95,9 @@ class Model:
        me.editInterval = []
        me.tEnd = []

        # Modeling options
        me.enableEntrainment = False

        # Edit options
        me.editOptions = collections.OrderedDict()
        me.editOptions["rod_edits"] = False
@@ -227,6 +230,19 @@ class Model:
            assert 'C' in model['options']
        me.frictionModel = model

    def setModel(me, enableEntrainment=None):
        """ Use to change modeling options.

        Any model that can be changed via this method has a default.
        This only needs to be called if the user wishes to change a deafult modeling option.

        Args:
           enableEntrainment (bool): Set to True to enable entrainment/de-entrainment of droplets

        """
        if enableEntrainment is not None:
            me.enableEntrainment = enableEntrainment

    def setFluidProperties(me, fluidprops):
        """Set the fluid property table to use.

+6 −2
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ def writeDeck(model, filename):
        hasmaps = 1
    else:
        hasmaps = 0
    if model.enableEntrainment:
        edmod = 1
    else:
        edmod = 0
    modelName = model.frictionModel['model']
    if modelName == 'original':
        irfc = 1
@@ -117,8 +121,8 @@ def writeDeck(model, filename):
        irfc = 4
    else:
        irfc = 5
    group1Data.append("     1{:5d}    0    3{:5d}{:15.5e}{:6d}    1{:5d}{:5d}{:5d}    0   7     0\n".format(
        irfc, model.solver, mdotInit, notrans, hasmaps, fluidprops, mflx))
    group1Data.append("     1{:5d}{:5d}    3{:5d}{:15.5e}{:6d}    1{:5d}{:5d}{:5d}    0   7     0\n".format(
        irfc, edmod, model.solver, mdotInit, notrans, hasmaps, fluidprops, mflx))
    group1Data.append("*Card 1.2\n")
    if mflx == 1:
        group1Data.append(
+4 −4
Original line number Diff line number Diff line
add_test(subkit_unit_tests test_unit_tests.sh ${CMAKE_CURRENT_BINARY_DIR}/../conda/bin/python)
add_test(subkit_input_tests test_input_mode.sh ${CMAKE_CURRENT_BINARY_DIR}/../conda/bin/python)
add_test(subkit_script_mode_tests test_script_mode.sh ${CMAKE_CURRENT_BINARY_DIR}/../conda/bin/python)
add_test(subkit_script_tests test_scripts.sh ${CMAKE_CURRENT_BINARY_DIR}/../conda/bin/python)
add_test(subkit_unit_tests test_unit_tests.sh)
add_test(subkit_input_tests test_input_mode.sh ../SubKit/build/InpBuild.py)
add_test(subkit_script_mode_tests test_script_mode.sh)
add_test(subkit_script_tests test_scripts.sh)
+4 −2
Original line number Diff line number Diff line
@@ -2,9 +2,12 @@
BASEDIR=$(pwd)


# Pass in the path to the InpBuild script to use for processing the input files
# The script that is passed in will need to know where WASP is to run these tests (should be build/install version)
SMBUILD=$(pwd)"/$1"

# Pass in "rebaseline" to do a rebaseline of all tests
if [ "$1" == "rebaseline" ]; then
if [ "$2" == "rebaseline" ]; then
   rebaseline=true
else
   rebaseline=false
@@ -82,7 +85,6 @@ runInputTest(){
   cd $BASEDIR
}

SMBUILD=$(pwd)"/../SubKit/build/InpBuild.py"
# Set the PYTHONPATH so InpBuild can find SMBuilder when it runs
export PYTHONPATH=$(pwd)"/../"
#Input Regression tests
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ ctf model
**NGR
   1
**NGAS IRFC EDMD IMIX ISOL          GINIT NOTRN MESH MAPS IPRP MFLX IBTM PPV  NM14
     1    2    0    3    0    0.00000e+00     1    1    0    0    1    0   7     0
     1    2    1    3    0    0.00000e+00     1    1    0    0    1    0   7     0
*Card 1.2
**         GTOT          AFLUX         DHFRAC      MASSFLUX
        0.00000       31.41593        0.00000     1000.00000
Loading