18.01.2015 Views

Automatic testing of solvers using PyFoam - If your ... - OpenFOAMWiki

Automatic testing of solvers using PyFoam - If your ... - OpenFOAMWiki

Automatic testing of solvers using PyFoam - If your ... - OpenFOAMWiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introduction<br />

The tools: pyFoam in 3 minutes<br />

The tools: swak4Foam - 3 more minutes<br />

Case study: Taylor-Green vortex<br />

Case study: Pitz-Daily<br />

CTest<br />

Conclusion<br />

Introduction<br />

The basic test<br />

Variations <strong>of</strong> the test<br />

First test script runTaylorGreenBasic.py<br />

1 #! / u s r / b i n / env python<br />

3 from <strong>PyFoam</strong> . I n f r a s t r u c t u r e . CTestRun import CTestRun<br />

5 c l a s s T a y l o r G r e e n B a s i c ( CTestRun ) :<br />

def i n i t ( s e l f ) :<br />

7 s e l f . s e t P a r a m e t e r s ( s o l v e r="pisoFoam" ,<br />

s i z e C l a s s="small" ,<br />

9 headLength =200 ,<br />

o r i g i n a l C a s e="taylorGreen" )<br />

11<br />

s e l f . addToClone ( "0.orig" ,<br />

13 "prepareCase.sh" )<br />

15 def meshPrepare ( s e l f ) :<br />

s e l f . s h e l l ( "./prepareCase.sh" )<br />

17<br />

i f __name__==’__main__’ :<br />

19 T a y l o r G r e e n B a s i c ( ) . run ( )<br />

Bernhard F.W. Gschaider <strong>Automatic</strong> <strong>testing</strong> <strong>of</strong> <strong>solvers</strong> <strong>using</strong> <strong>PyFoam</strong> 66/164

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!