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

Add ability to set turbulent mixing coefficient in model

And change the default to the current one used in CTF.
parent f6a30949
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -136,6 +136,9 @@ class Model:
      me.setInitialConditionsCalled = False
      me.setInitialConditionsMassFluxCalled = False

      # Single-phase turbulent mixing coefficient
      me.beta = 0.037


   def setTitle(me, title):
      """Set the title of the model.
@@ -146,6 +149,16 @@ class Model:
      """
      me.title = str(title)

   def setModelOptions(me, beta=None):
      """ Set various modeling options

      Args:
         beta (float): Single-phase turbulent mixing coefficietn
      """

      if beta is not None:
         me.beta = beta

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

+1 −1
Original line number Diff line number Diff line
@@ -630,7 +630,7 @@ def writeDeck(model, filename):
   group12Data.append("   12\n")
   group12Data.append("*Card 12.2\n")
   group12Data.append("**    AAAK      BETA     THETM\n")
   group12Data.append(" 0.140E+01 0.500E-02 0.500E+01\n")
   group12Data.append(" 0.140E+01{:10.3e} 0.500E+01\n".format(model.beta))


   group13Data.append("**Card 13.4\n")
+6 −6
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ ctf model
   12
*Card 12.2
**    AAAK      BETA     THETM
 0.140E+01 0.500E-02 0.500E+01
 0.140E+01 3.700e-02 0.500E+01
***********************************************************************************************
*GROUP 13 -  Boundary Condition Data
***********************************************************************************************
+2 −2
Original line number Diff line number Diff line
@@ -20373,7 +20373,7 @@
   12
*Card 12.2
**    AAAK      BETA     THETM
 0.140E+01 0.500E-02 0.500E+01
 0.140E+01 3.700e-02 0.500E+01
***********************************************************************************************
*GROUP 13 -  Boundary Condition Data
***********************************************************************************************
+5 −5
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ ctf model
   12
*Card 12.2
**    AAAK      BETA     THETM
 0.140E+01 0.500E-02 0.500E+01
 0.140E+01 3.700e-02 0.500E+01
***********************************************************************************************
*GROUP 13 -  Boundary Condition Data
***********************************************************************************************
Loading