Exemplo n.º 1
0
    def __init__(self, parent, case):
        """
        Constructor
        """
        QWidget.__init__(self, parent)

        Ui_CathareCouplingForm.__init__(self)
        self.setupUi(self)

        self.case = case

        self.case.undoStopGlobal()

        self.__model = CathareCouplingModel(self.case)

        # Main combo box
        self.activateCathareCpl = QtPage.ComboModel(self.comboBoxActiveCpl,2,1)
        self.activateCathareCpl.addItem(self.tr("No coupling"),       "off")
        self.activateCathareCpl.addItem(self.tr("Activate coupling"), "on")


        # Models
        self.modelCathare = StandardItemModelCathare(self.__model)
        self.tableViewCathare.setModel(self.modelCathare)

        if QT_API == "PYQT4":
            self.tableViewCathare.verticalHeader().setResizeMode(QHeaderView.ResizeToContents)
            self.tableViewCathare.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents)
            self.tableViewCathare.horizontalHeader().setResizeMode(4, QHeaderView.Stretch)
        elif QT_API == "PYQT5":
            self.tableViewCathare.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
            self.tableViewCathare.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
            self.tableViewCathare.horizontalHeader().setSectionResizeMode(4, QHeaderView.Stretch)

        delegateCathareElt = CathareEltDelegate(self.tableViewCathare)
        self.tableViewCathare.setItemDelegateForColumn(0, delegateCathareElt)

        delegateCathareFCell = CathareEltDelegate(self.tableViewCathare)
        self.tableViewCathare.setItemDelegateForColumn(1, delegateCathareFCell)

        delegateCathareLCell = CathareEltDelegate(self.tableViewCathare)
        self.tableViewCathare.setItemDelegateForColumn(2, delegateCathareLCell)

        delegateNeptuneBc = NcfdBcDelegate(self.tableViewCathare, case=case)
        self.tableViewCathare.setItemDelegateForColumn(3, delegateNeptuneBc)

        delegateNeptune1dZone = SelectionCriteriaDelegate(self.tableViewCathare,
                                                          self.__model)
        self.tableViewCathare.setItemDelegateForColumn(4, delegateNeptune1dZone)

        # Connections
        self.pushButtonAdd.clicked.connect(self.slotAddCathare)
        self.pushButtonDelete.clicked.connect(self.slotDeleteCathare)

        self.comboBoxActiveCpl.activated[str].connect(self.slotActivateCpl)

        self.radioButtonOnePhase.clicked.connect(self.slotOnePhase)
        self.radioButtonAllPhases.clicked.connect(self.slotAllPhases)

        self.lineEditCathareFile.textChanged[str].connect(self.slotCathareFile)
        self.lineEditCplName.textChanged[str].connect(self.slotCplName)

        self.lineEditCplTime.textChanged[str].connect(self.slotCplTime)
        self.lineEditCathareInitTime.textChanged[str].connect(self.slotCathareTime)

        # Insert list of Cathare couplings for view
        for c in self.__model.getCathareCouplingList():
            [cathare_elt, cathare_first_cell, cathare_last_cell,
             neptune_bc, neptune_1d_zone] = c

            self.modelCathare.addItem(cathare_elt,
                                      cathare_first_cell, cathare_last_cell,
                                      neptune_bc, neptune_1d_zone)


        # ------------------------------------------
        # Activate the coupling parameters if needed
        if self.__model.getCathareActivationStatus() != 0:
            self.activateCathareCpl.setItem(str_model="on")


        if self.__getActivationState() == 'off':
            self.groupBoxCathareCpls.hide()
            self.groupBoxCplParameters.hide()
        else:
            self.groupBoxCathareCpls.show()
            self.groupBoxCplParameters.show()

        # ------------------------------------------
        if self.__model.getNphases() == 0 or self.__model.getNphases() == 1:
            self.radioButtonOnePhase.setChecked(True)
            self.radioButtonAllPhases.setChecked(False)
        else:
            self.radioButtonOnePhase.setChecked(False)
            self.radioButtonAllPhases.setChecked(True)

        # ------------------------------------------
        if self.__getActivationState() == 'on':
            self.lineEditCathareFile.setText(str(self.__model.getCathareFile()))
            self.lineEditCplName.setText(str(self.__model.getCplName()))

            self.lineEditCplTime.setText(str(self.__model.getCplTime()))
            self.lineEditCathareInitTime.setText(str(self.__model.getCathareTime()))

        # ------------------------------------------
        self.case.undoStartGlobal()
Exemplo n.º 2
0
    def __init__(self, parent, case):
        """
        Constructor
        """
        QWidget.__init__(self, parent)

        Ui_CathareCouplingForm.__init__(self)
        self.setupUi(self)

        self.case = case

        self.case.undoStopGlobal()

        self.__model = CathareCouplingModel(self.case)

        # Main combo box
        self.activateCathareCpl = QtPage.ComboModel(self.comboBoxActiveCpl, 2,
                                                    1)
        self.activateCathareCpl.addItem(self.tr("No coupling"), "off")
        self.activateCathareCpl.addItem(self.tr("Activate coupling"), "on")

        # Models
        self.modelCathare = StandardItemModelCathare(self.__model)
        self.tableViewCathare.setModel(self.modelCathare)

        if QT_API == "PYQT4":
            self.tableViewCathare.verticalHeader().setResizeMode(
                QHeaderView.ResizeToContents)
            self.tableViewCathare.horizontalHeader().setResizeMode(
                QHeaderView.ResizeToContents)
            self.tableViewCathare.horizontalHeader().setResizeMode(
                4, QHeaderView.Stretch)
        elif QT_API == "PYQT5":
            self.tableViewCathare.verticalHeader().setSectionResizeMode(
                QHeaderView.ResizeToContents)
            self.tableViewCathare.horizontalHeader().setSectionResizeMode(
                QHeaderView.ResizeToContents)
            self.tableViewCathare.horizontalHeader().setSectionResizeMode(
                4, QHeaderView.Stretch)

        delegateCathareElt = LabelDelegate(self.tableViewCathare)
        self.tableViewCathare.setItemDelegateForColumn(0, delegateCathareElt)

        delegateCathareFCell = LabelDelegate(self.tableViewCathare)
        self.tableViewCathare.setItemDelegateForColumn(1, delegateCathareFCell)

        delegateCathareLCell = LabelDelegate(self.tableViewCathare)
        self.tableViewCathare.setItemDelegateForColumn(2, delegateCathareLCell)

        ncfdBcList = ['off']
        ncfdBcState = ['na']
        if self.case:
            d = LocalizationModel('BoundaryZone', self.case)
            for zone in d.getZones():
                ncfdBcList.append(zone.getLabel())
                ncfdBcState.append("on")
        delegateNeptuneBc = ComboDelegate(self.tableViewCathare,
                                          opts_list=ncfdBcList,
                                          opts_state=ncfdBcState)
        self.tableViewCathare.setItemDelegateForColumn(3, delegateNeptuneBc)

        # Create a selection delegate with autocompletion for mesh
        # selection examples
        _comp_list = GuiLabelManager().getCompleter("mesh_selection")
        delegateNeptune1dZone = LabelDelegate(self.tableViewCathare,
                                              xml_model=self.__model,
                                              accepted_regex="[ -~]*",
                                              auto_completion=_comp_list)
        self.tableViewCathare.setItemDelegateForColumn(4,
                                                       delegateNeptune1dZone)

        # Connections
        self.pushButtonAdd.clicked.connect(self.slotAddCathare)
        self.pushButtonDelete.clicked.connect(self.slotDeleteCathare)

        self.comboBoxActiveCpl.activated[str].connect(self.slotActivateCpl)

        self.radioButtonOnePhase.clicked.connect(self.slotOnePhase)
        self.radioButtonAllPhases.clicked.connect(self.slotAllPhases)

        self.lineEditCathareFile.textChanged[str].connect(self.slotCathareFile)
        self.toolButtonCathareFile.pressed.connect(self.searchCathareJDD)
        self.lineEditCplName.textChanged[str].connect(self.slotCplName)

        self.lineEditCplTime.textChanged[str].connect(self.slotCplTime)
        self.lineEditCathareInitTime.textChanged[str].connect(
            self.slotCathareTime)

        self.lineEditCathareInstance.textChanged[str].connect(
            self.slotCathareInstanceName)
        self.toolButtonCathareInstance.pressed.connect(self.searchCathareDir)
        self.lineEditNeptuneInstance.textChanged[str].connect(
            self.slotNeptuneInstanceName)
        self.toolButtonNeptuneInstance.pressed.connect(self.searchNeptuneDir)

        # Insert list of Cathare couplings for view
        for c in self.__model.getCathareCouplingList():
            [
                cathare_elt, cathare_first_cell, cathare_last_cell, neptune_bc,
                neptune_1d_zone
            ] = c

            self.modelCathare.addItem(cathare_elt, cathare_first_cell,
                                      cathare_last_cell, neptune_bc,
                                      neptune_1d_zone)

        # ------------------------------------------
        # Activate the coupling parameters if needed
        if self.__model.getCathareActivationStatus() != 0:
            self.activateCathareCpl.setItem(str_model="on")

        if self.__getActivationState() == 'off':
            self.groupBoxCathareCpls.hide()
            self.groupBoxCplParameters.hide()
        else:
            self.groupBoxCathareCpls.show()
            self.groupBoxCplParameters.show()

        # ------------------------------------------
        if self.__model.getNphases() == 0 or self.__model.getNphases() == 1:
            self.radioButtonOnePhase.setChecked(True)
            self.radioButtonAllPhases.setChecked(False)
        else:
            self.radioButtonOnePhase.setChecked(False)
            self.radioButtonAllPhases.setChecked(True)

        # ------------------------------------------
        if self.__getActivationState() == 'on':
            self.lineEditCathareFile.setText(str(
                self.__model.getCathareFile()))
            self.lineEditCplName.setText(str(self.__model.getCplName()))

            self.lineEditCplTime.setText(str(self.__model.getCplTime()))
            self.lineEditCathareInitTime.setText(
                str(self.__model.getCathareTime()))

            self.lineEditCathareInstance.setText(
                str(self.__model.getCathareInstanceName()))
            self.lineEditNeptuneInstance.setText(
                str(self.__model.getNeptuneInstanceName()))

        # ------------------------------------------
        self.case.undoStartGlobal()
Exemplo n.º 3
0
class AnalysisFeaturesView(QWidget, Ui_AnalysisFeaturesForm):
    """
    Class to open Calculation Features Page.
    """
    def __init__(self, parent, case, tree):
        """
        Constructor.
        """

        self.parent = parent

        import os
        self.icondir = os.path.dirname(os.path.abspath(__file__)) + '/../Base/'

        QWidget.__init__(self, parent)

        Ui_AnalysisFeaturesForm.__init__(self)
        self.setupUi(self)

        self.case = case
        self.browser = tree

        self.case.undoStopGlobal()

        self.checkPrev = None

        # Set models and number of elements for combo boxes

        self.modelSinglePhase = QtPage.ComboModel(self.comboBoxSinglePhase, 3,
                                                  1)
        self.modelHgn = QtPage.ComboModel(self.comboBoxHgn, 2, 1)
        self.modelAtmospheric = QtPage.ComboModel(self.comboBoxAtmospheric, 3,
                                                  1)
        self.modelReactiveFlows = QtPage.ComboModel(self.comboBoxReactiveFlows,
                                                    2, 1)
        self.modelGasCombustion = QtPage.ComboModel(self.comboBoxGasCombustion,
                                                    3, 1)
        self.modelCoalCombustion = QtPage.ComboModel(
            self.comboBoxCoalCombustion, 2, 1)
        self.modelJouleEffect = QtPage.ComboModel(self.comboBoxJouleEffect, 2,
                                                  1)
        self.modelGroundwater = QtPage.ComboModel(self.comboBoxGroundwater, 1,
                                                  1)

        self.modelNeptuneCFD = QtPage.ComboModel(self.comboBoxNeptuneCFD, 2, 1)

        self.modelSinglePhase.addItem(self.tr("Incompressible"), 'off')
        self.modelSinglePhase.addItem(
            self.tr("Compressible, perfect gas with constant gamma"),
            'constant_gamma')
        self.modelSinglePhase.addItem(
            self.tr("Compressible, perfect gas with variable gamma"),
            'variable_gamma')
        self.modelSinglePhase.disableItem(str_model='variable_gamma')

        self.modelAtmospheric.addItem(self.tr("constant density"), "constant")
        self.modelAtmospheric.addItem(self.tr("dry atmosphere"), "dry")
        self.modelAtmospheric.addItem(self.tr("humid atmosphere"), "humid")

        self.modelReactiveFlows.addItem(self.tr("Gas combustion"),
                                        "gas_combustion")
        self.modelReactiveFlows.addItem(self.tr("Pulverized Coal"),
                                        "pulverized_coal")

        self.modelGasCombustion.addItem(
            self.tr("perfect premixed flame (Eddy Break-Up)"), "ebu")
        self.modelGasCombustion.addItem(
            self.tr("infinitely fast chemistry diffusion flame"), "d3p")
        self.modelGasCombustion.addItem(
            self.tr("partial premixed flame (Libby_Williams)"), "lwp")

        self.modelCoalCombustion.addItem(self.tr("homogeneous approach"),
                                         "homogeneous_fuel")
        self.modelCoalCombustion.addItem(
            self.tr("homogeneous approach with moisture"),
            "homogeneous_fuel_moisture")

        self.modelJouleEffect.addItem(self.tr("Joule Effect"), "joule")
        self.modelJouleEffect.addItem(
            self.tr("Joule Effect and Laplace Forces"), "arc")

        self.modelGroundwater.addItem(self.tr("Groundwater flows"),
                                      'groundwater')

        self.modelHgn.addItem(self.tr("No mass transfer"), 'no_mass_transfer')
        self.modelHgn.addItem(
            self.tr("Vaporization / Condensation Merkle model"),
            'merkle_model')

        self.modelNeptuneCFD.addItem(self.tr("User-defined"), "None")
        self.modelNeptuneCFD.addItem(self.tr("Thermal free surface flow"),
                                     "free_surface")
        self.modelNeptuneCFD.addItem(self.tr("Boiling flow"), "boiling_flow")
        self.modelNeptuneCFD.addItem(self.tr("Droplet-laden flow"),
                                     "droplet_flow")
        self.modelNeptuneCFD.addItem(self.tr("Particle-laden flow"),
                                     "particles_flow")

        # Lagrangian combobox

        self.modelLagrangian = QtPage.ComboModel(self.comboBoxLagrangian, 4, 1)
        self.modelLagrangian.addItem(self.tr("off"), "off")
        self.modelLagrangian.addItem(self.tr("One-way coupling"), "one_way")
        self.modelLagrangian.addItem(self.tr("Two-way coupling"), "two_way")
        self.modelLagrangian.addItem(self.tr("Frozen carrier flow"), "frozen")

        # Turbomachinery combobox

        self.modelTurboMachinery = QtPage.ComboModel(
            self.comboBoxTurboMachinery, 5, 1)
        self.modelTurboMachinery.addItem(self.tr("None"), "off")
        self.modelTurboMachinery.addItem(self.tr("Full transient simulation"),
                                         "transient")
        self.modelTurboMachinery.addItem(
            self.tr("Transient with explicit coupling"), "transient_coupled")
        self.modelTurboMachinery.addItem(self.tr("Frozen rotor model"),
                                         "frozen")
        self.modelTurboMachinery.addItem(
            self.tr("Frozen rotor with explicit coupling"), "frozen_coupled")

        self.__uncheckRadioButtons()

        # Connect signals to slots

        self.comboBoxAtmospheric.activated[str].connect(self.slotAtmospheric)
        self.comboBoxReactiveFlows.activated[str].connect(
            self.slotReactiveFlows)
        self.comboBoxGasCombustion.activated[str].connect(
            self.slotGasCombustion)
        self.comboBoxCoalCombustion.activated[str].connect(
            self.slotCoalCombustion)
        self.comboBoxJouleEffect.activated[str].connect(self.slotJouleEffect)
        self.comboBoxSinglePhase.activated[str].connect(self.slotSinglePhase)
        self.comboBoxGroundwater.activated[str].connect(self.slotGroundwater)
        self.comboBoxHgn.activated[str].connect(self.slotHgn)
        self.comboBoxNeptuneCFD.activated[str].connect(self.slotNeptuneCFD)
        self.checkBoxALE.stateChanged.connect(self.slotALE)
        self.checkBoxFans.stateChanged.connect(self.slotFans)

        self.comboBoxLagrangian.activated[str].connect(self.slotLagrangian)
        self.comboBoxTurboMachinery.activated[str].connect(self.slotTurboModel)

        for ind in [
                'SinglePhase', 'Atmospheric', 'JouleEffect', 'Groundwater',
                'ReactiveFlows', 'Hgn', 'NeptuneCFD'
        ]:
            eval('self.radioButton' + ind +
                 '.toggled.connect(self.slotRadioButton)')

        # Initializations based on code

        if self.case.xmlRootNode().tagName == "Code_Saturne_GUI":
            self.init_saturne()

            # Enable NEPTUNE_CFD based on presence and/or environment
            # variable (environment variable has precedence
            # for ease of testing)
            enable_neptune_cfd = False
            try:
                from neptune_cfd.nc_package import package as nc_package
                enable_neptune_cfd = True
            except Exception:
                pass
            ev_enable = os.getenv('CS_GUI_ENABLE_NEPTUNE_CFD')
            if ev_enable:
                try:
                    if int(ev_enable) != 0:
                        enable_neptune_cfd = True
                    else:
                        enable_neptune_cfd = False
                except Exception:
                    pass
            self.radioButtonNeptuneCFD.setEnabled(enable_neptune_cfd)

        elif self.case.xmlRootNode().tagName == "NEPTUNE_CFD_GUI":
            self.init_neptune()

        self.tbm = TurboMachineryModel(self.case)
        self.ale = MobileMeshModel(self.case)
        self.fans = FansStatus(self.case)

        self.init_common()

        # Update the Tree files and folders

        self.browser.configureTree(self.case)

        self.case.undoStartGlobal()
Exemplo n.º 4
0
class AnalysisFeaturesView(QWidget, Ui_AnalysisFeaturesForm):
    """
    Class to open Calculation Features Page.
    """
    def __init__(self, parent, case, tree):
        """
        Constructor.
        """
        QWidget.__init__(self, parent)

        Ui_AnalysisFeaturesForm.__init__(self)
        self.setupUi(self)

        self.case = case
        self.browser = tree

        self.case.undoStopGlobal()

        self.lagr = LagrangianModel(self.case)
        self.turb = TurbulenceModel(self.case)
        self.gas = GasCombustionModel(self.case)
        self.pcoal = CoalCombustionModel(self.case)
        self.elect = ElectricalModel(self.case)
        self.scal = DefineUserScalarsModel(self.case)
        self.atmo = AtmosphericFlowsModel(self.case)
        self.comp = CompressibleModel(self.case)
        self.darc = GroundwaterModel(self.case)

        # Set models and number of elements for combo boxes

        self.modelLagrangian = QtPage.ComboModel(self.comboBoxLagrangian, 4, 1)
        self.modelAtmospheric = QtPage.ComboModel(self.comboBoxAtmospheric, 4,
                                                  1)
        self.modelGasCombustionModel = QtPage.ComboModel(
            self.comboBoxGasCombustionModel, 3, 1)
        self.modelPulverizedCoal = QtPage.ComboModel(
            self.comboBoxPulverizedCoal, 3, 1)
        self.modelJouleEffect = QtPage.ComboModel(self.comboBoxJouleEffect, 3,
                                                  1)
        self.modelCompressible = QtPage.ComboModel(self.comboBoxCompressible,
                                                   3, 1)
        self.modelGroundwater = QtPage.ComboModel(self.comboBoxGroundwater, 2,
                                                  1)

        self.modelLagrangian.addItem(self.tr("off"), "off")
        self.modelLagrangian.addItem(self.tr("One-way coupling"), "one_way")
        self.modelLagrangian.addItem(self.tr("Two-way coupling"), "two_way")
        self.modelLagrangian.addItem(self.tr("Frozen carrier flow"), "frozen")

        self.modelAtmospheric.addItem(self.tr("off"), "off")
        self.modelAtmospheric.addItem(self.tr("constant density"), "constant")
        self.modelAtmospheric.addItem(self.tr("dry atmosphere"), "dry")
        self.modelAtmospheric.addItem(self.tr("humid atmosphere"), "humid")

        self.modelGasCombustionModel.addItem(self.tr("off"), "off")
        self.modelGasCombustionModel.addItem(
            self.tr("perfect premixed flame (Eddy Break-Up)"), "ebu")
        self.modelGasCombustionModel.addItem(
            self.tr("infinitely fast chemistry diffusion flame"), "d3p")
        self.modelGasCombustionModel.addItem(
            self.tr("partial premixed flame (Libby_Williams)"), "lwp")

        self.modelPulverizedCoal.addItem(self.tr("off"), "off")
        self.modelPulverizedCoal.addItem(self.tr("homogeneous approach"),
                                         "homogeneous_fuel")
        self.modelPulverizedCoal.addItem(
            self.tr("homogeneous approach with moisture"),
            "homogeneous_fuel_moisture")

        self.modelJouleEffect.addItem(self.tr("off"), "off")
        self.modelJouleEffect.addItem(self.tr("Joule Effect"), "joule")
        self.modelJouleEffect.addItem(
            self.tr("Joule Effect and Laplace Forces"), "arc")

        self.modelCompressible.addItem(self.tr("off"), 'off')
        self.modelCompressible.addItem(
            self.tr("Perfect gas with constant gamma"), 'constant_gamma')
        self.modelCompressible.addItem(
            self.tr("Perfect gas with variable gamma"), 'variable_gamma')
        #self.modelCompressible.addItem(self.tr("Van Der Waals"), 'van_der_waals')

        self.modelGroundwater.addItem(self.tr("off"), 'off')
        self.modelGroundwater.addItem(self.tr("Groundwater flows"),
                                      'groundwater')

        # Connect signals to slots

        self.comboBoxLagrangian.activated[str].connect(self.slotLagrangian)
        self.comboBoxAtmospheric.activated[str].connect(self.slotAtmospheric)
        self.comboBoxGasCombustionModel.activated[str].connect(
            self.slotGasCombustionModel)
        self.comboBoxPulverizedCoal.activated[str].connect(
            self.slotPulverizedCoal)
        self.comboBoxJouleEffect.activated[str].connect(self.slotJouleEffect)
        self.comboBoxCompressible.activated[str].connect(
            self.slotCompressibleModel)
        self.comboBoxGroundwater.activated[str].connect(
            self.slotGroundwaterModel)

        # Initialize Widgets

        from code_saturne.Pages.TimeStepModel import TimeStepModel
        idtvar = TimeStepModel(self.case).getTimePassing()
        idtvar_p = idtvar

        mdl = self.lagr.getLagrangianModel()
        self.modelLagrangian.setItem(str_model=mdl)

        if mdl != 'off':
            if idtvar not in [0, 1]:
                idtvar = 0

        val = self.atmo.getAtmosphericFlowsModel()
        self.modelAtmospheric.setItem(str_model=val)

        model = self.gas.getGasCombustionModel()
        self.modelGasCombustionModel.setItem(str_model=model)

        elec = self.elect.getElectricalModel()
        self.modelJouleEffect.setItem(str_model=elec)

        compressible = self.comp.getCompressibleModel()
        self.modelCompressible.setItem(str_model=compressible)
        self.modelCompressible.disableItem(str_model='variable_gamma')

        if compressible != 'off':
            if idtvar not in [0, 1]:
                idtvar = 0
            self.comboBoxLagrangian.setEnabled(False)

        # Multi-phase flow and coal combustion
        coal = self.pcoal.getCoalCombustionModel()
        self.modelPulverizedCoal.setItem(str_model=coal)

        if coal == 'homogeneous_fuel_moisture':
            self.modelLagrangian.disableItem(str_model='two_way')

        lagr = self.lagr.getLagrangianModel()
        self.modelLagrangian.setItem(str_model=lagr)
        if lagr == 'off':
            self.modelPulverizedCoal.enableItem(str_model='homogeneous_fuel')
        else:
            self.modelPulverizedCoal.disableItem(str_model='homogeneous_fuel')

        # Compatibility between turbulence model and multi-phases flow model

        if self.turb.getTurbulenceModel() not in \
                ('off', 'k-epsilon', 'k-epsilon-PL',
                 'Rij-epsilon', 'Rij-SSG', 'Rij-EBRSM', 'v2f-BL-v2/k',
                 'k-omega-SST', 'Spalart-Allmaras'):
            self.modelLagrangian.setItem(str_model='off')
            self.comboBoxLagrangian.setEnabled(False)

        # Compatibility between turbulence model and reactive flow models

        if self.turb.getTurbulenceModel() not in ('k-epsilon', 'k-epsilon-PL',
                                                  'Rij-epsilon', 'Rij-SSG',
                                                  'Rij-EBRSM', 'v2f-BL-v2/k',
                                                  'k-omega-SST',
                                                  'Spalart-Allmaras'):

            self.modelGasCombustionModel.setItem(str_model='off')
            self.modelPulverizedCoal.setItem(str_model='off')
            self.modelJouleEffect.setItem(str_model='off')

            self.modelGasCombustionModel.disableItem(str_model='ebu')
            self.modelGasCombustionModel.disableItem(str_model='d3p')
            self.modelGasCombustionModel.disableItem(str_model='lwp')

            self.modelPulverizedCoal.disableItem(str_model='homogeneous_fuel')
            self.modelPulverizedCoal.disableItem(
                str_model='homogeneous_fuel_moisture')

            self.comboBoxGasCombustionModel.setEnabled(False)
            self.comboBoxPulverizedCoal.setEnabled(False)

        # Update the QComboBox

        flame = self.gas.getGasCombustionModel()
        coal = self.pcoal.getCoalCombustionModel()
        joule = self.elect.getElectricalModel()
        atmospheric = self.atmo.getAtmosphericFlowsModel()
        compressible = self.comp.getCompressibleModel()
        darcy = self.darc.getGroundwaterModel()

        self.modelGasCombustionModel.setItem(str_model=flame)
        self.modelPulverizedCoal.setItem(str_model=coal)
        self.modelJouleEffect.setItem(str_model=joule)
        self.modelAtmospheric.setItem(str_model=atmospheric)
        self.modelCompressible.setItem(str_model=compressible)
        self.modelGroundwater.setItem(str_model=darcy)

        # If one model is turned on, the others are turned off

        if (flame, coal, joule, atmospheric, compressible,
                darcy) != ('off', 'off', 'off', 'off', 'off', 'off'):

            if flame == 'off':
                self.comboBoxGasCombustionModel.setEnabled(False)

            if coal == 'off':
                self.comboBoxPulverizedCoal.setEnabled(False)

            if joule == 'off':
                self.comboBoxJouleEffect.setEnabled(False)

            if atmospheric == 'off':
                self.comboBoxAtmospheric.setEnabled(False)

            if compressible == 'off':
                self.comboBoxCompressible.setEnabled(False)

            if darcy == 'off':
                self.comboBoxGroundwater.setEnabled(False)

        if darcy != 'off':
            if idtvar not in [0, 1]:
                idtvar = 0
            self.comboBoxLagrangian.setEnabled(False)

        # Update time step model if needed

        if idtvar_p != idtvar:
            TimeStepModel(self.case).setTimePassing(idtvar)

        # Update the Tree files and folders

        self.browser.configureTree(self.case)

        self.case.undoStartGlobal()