当前位置: 首页>>代码示例>>Python>>正文


Python SolutionDirectory.addBackup方法代码示例

本文整理汇总了Python中PyFoam.RunDictionary.SolutionDirectory.SolutionDirectory.addBackup方法的典型用法代码示例。如果您正苦于以下问题:Python SolutionDirectory.addBackup方法的具体用法?Python SolutionDirectory.addBackup怎么用?Python SolutionDirectory.addBackup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyFoam.RunDictionary.SolutionDirectory.SolutionDirectory的用法示例。


在下文中一共展示了SolutionDirectory.addBackup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: SolutionDirectory

# 需要导入模块: from PyFoam.RunDictionary.SolutionDirectory import SolutionDirectory [as 别名]
# 或者: from PyFoam.RunDictionary.SolutionDirectory.SolutionDirectory import addBackup [as 别名]
import PyFoam
import math
import time
import numpy as np
from PyFoam.RunDictionary.SolutionDirectory import SolutionDirectory
from PyFoam.RunDictionary.SolutionFile import SolutionFile
from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile
from PyFoam.Execution.AnalyzedRunner import AnalyzedRunner
from PyFoam.LogAnalysis.StandardLogAnalyzer import StandardLogAnalyzer
from PyFoam.Execution.BasicRunner import BasicRunner
from PyFoam.Execution.GnuplotRunner import GnuplotRunner

case = "polarStudy"
caseDir = SolutionDirectory(".",archive="polars")
caseDir.addBackup("postProcessing/forceCoeffs/0/forceCoeffs.dat")
caseDir.addBackup("PyFoamSolve.logfile")
caseDir.addBackup("PyFoamSolve.analyzed")
parameters = ParsedParameterFile("boundaryConditions",noHeader=True,preserveComments=False)

vRange =   np.arange(25,31,2.5)
alphaRange = np.arange(0,11,1)
print vRange
caseDir.clearResults()
caseDir.clear(functionObjectData=True)

valueList = []

for i in range(len(vRange)):
    for j in range(len(alphaRange)):
        valueList.append({'velocity':vRange[i],'alpha':alphaRange[j]})
开发者ID:schmidi093,项目名称:RTVC,代码行数:32,代码来源:runPolarStudy.py

示例2: range

# 需要导入模块: from PyFoam.RunDictionary.SolutionDirectory import SolutionDirectory [as 别名]
# 或者: from PyFoam.RunDictionary.SolutionDirectory.SolutionDirectory import addBackup [as 别名]
Collects some results"""

from PyFoam.Execution.ConvergenceRunner import ConvergenceRunner
from PyFoam.Execution.UtilityRunner import UtilityRunner
from PyFoam.LogAnalysis.BoundingLogAnalyzer import BoundingLogAnalyzer
from PyFoam.RunDictionary.SolutionFile import SolutionFile
from PyFoam.RunDictionary.SolutionDirectory import SolutionDirectory

solver="simpleFoam"
case="pitzDaily"
pCmd="calcPressureDifference"
mCmd="calcMassFlow"

dire=SolutionDirectory(case,archive="InletVariation")
dire.clearResults()
dire.addBackup("PyFoamSolve.logfile")
dire.addBackup("PyFoamSolve.analyzed")
dire.addBackup("Pressure.analyzed")
dire.addBackup("MassFlow.analyzed")

sol=SolutionFile(dire.initialDir(),"U")

maximum=1.
nr=10

f=dire.makeFile("InflowVariationResults")

for i in range(nr+1):
    # Set the boundary condition at the inlet
    val=(maximum*i)/nr
    print "Inlet velocity:",val
开发者ID:LeeRuns,项目名称:PyFoam,代码行数:33,代码来源:doInletVariation.py


注:本文中的PyFoam.RunDictionary.SolutionDirectory.SolutionDirectory.addBackup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。