Exemplo n.º 1
0
def set_piso_correctors(nCorrectors, fvSolution_path="system/fvSolution"):
  """
  Assumed format: each setting is on its own line.
  """
  file_operations.change_line(fvSolution_path, ['nCorrectors', ';'], ['//'], \
    "\tnCorrectors\t\t"+str(nCorrectors)+";\n")
  return
Exemplo n.º 2
0
def set_piso_correctors(nCorrectors, fvSolution_path="system/fvSolution"):
    """
  Assumed format: each setting is on its own line.
  """
    file_operations.change_line(fvSolution_path, ['nCorrectors', ';'], ['//'], \
      "\tnCorrectors\t\t"+str(nCorrectors)+";\n")
    return
Exemplo n.º 3
0
def second_order_spatial(fvSchemes_path="system/fvSchemes"):
  """
  Assumed format: each setting is on its own line.
  """
  file_operations.change_line(fvSchemes_path, ['div', 'phi', 'U'], ['//'], \
    "\tdiv(phi,U)\t\tGauss linearUpwind grad(U);\n")
  file_operations.change_line(fvSchemes_path, ['div', 'phi', 'k'], ['//'], \
    "\tdiv(phi,k)\t\tGauss limitedLinear 1;\n")
  file_operations.change_line(fvSchemes_path, ['div', 'phi', 'omega'], \
    ['//'], "\tdiv(phi,omega)\tGauss limitedLinear 1;\n")
  file_operations.change_line(fvSchemes_path, ['div', 'phi', 'nut'], \
    ['//'], "\tdiv(phi,nut)\tGauss limitedLinear 1;\n")
  return
Exemplo n.º 4
0
def second_order_spatial(fvSchemes_path="system/fvSchemes"):
    """
  Assumed format: each setting is on its own line.
  """
    file_operations.change_line(fvSchemes_path, ['div', 'phi', 'U'], ['//'], \
      "\tdiv(phi,U)\t\tGauss linearUpwind grad(U);\n")
    file_operations.change_line(fvSchemes_path, ['div', 'phi', 'k'], ['//'], \
      "\tdiv(phi,k)\t\tGauss limitedLinear 1;\n")
    file_operations.change_line(fvSchemes_path, ['div', 'phi', 'omega'], \
      ['//'], "\tdiv(phi,omega)\tGauss limitedLinear 1;\n")
    file_operations.change_line(fvSchemes_path, ['div', 'phi', 'nut'], \
      ['//'], "\tdiv(phi,nut)\tGauss limitedLinear 1;\n")
    return
Exemplo n.º 5
0
def set_force_output_interval(controlDict_path="system/controlDict", \
  outputInterval=50):
  file_operations.change_line(controlDict_path, ["outputInterval"], \
    [], "\t\toutputInterval\t\t"+str(outputInterval)+";\n")
  return
Exemplo n.º 6
0
def set_courant_number(controlDict_path="system/controlDict", maxCo=1):
  file_operations.change_line(controlDict_path, ["maxCo"], \
    [], "\tmaxCo\t\t"+str(maxCo)+";\n")
  return
Exemplo n.º 7
0
def set_force_output_interval(controlDict_path="system/controlDict", \
  outputInterval=50):
    file_operations.change_line(controlDict_path, ["outputInterval"], \
      [], "\t\toutputInterval\t\t"+str(outputInterval)+";\n")
    return
Exemplo n.º 8
0
def set_courant_number(controlDict_path="system/controlDict", maxCo=1):
    file_operations.change_line(controlDict_path, ["maxCo"], \
      [], "\tmaxCo\t\t"+str(maxCo)+";\n")
    return