CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [PyFoam] Parameter Variation with Contrib PyFoam (https://www.cfd-online.com/Forums/openfoam-community-contributions/87996-parameter-variation-contrib-pyfoam.html)

tian May 5, 2011 04:37

Parameter Variation with Contrib PyFoam
 
Hi,

I try to use Contrib PyFoam as "Parameter Variation" in cooperation with the tool "probeLocation". Is it possible to catch the value "T" as Temperature of the probe location log file instead of pressure difference and change the boundary case depend of the probe location value? Thanks

# Get the pressure difference (Using an external utility)
pUtil=UtilityRunner(argv=[pCmd,".",case],silent=True,logname="Pressure")
pUtil.add("deltaP","Pressure at .* Difference .*\] (.+)")
pUtil.start()

Bye Thomas

tian May 5, 2011 07:01

Hi,

I got it:

time1,line=map(float,open(case+"/probes/"+dire.getLast()+"/T").readlines()[-1].split())
deltaT=line

Bye
Thomas


All times are GMT -4. The time now is 02:37.