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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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 />

Testing whether the run ended<br />

• The first checks whether the time in the runInfo is equal to<br />

the endTime in the controlDict<br />

• <strong>If</strong> it is smaller then the run ended abnormally<br />

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

2 i f s e l f . r u n I n f o ( ) [ "time"]< s e l f . c o n t r o l D i c t <br />

( ) [ "endTime" ] :<br />

s e l f . f a i l ( "Simulation␣did␣not␣reach␣<br />

endTime" ,<br />

4 s e l f . c o n t r o l D i c t ( ) [ "endTime"<br />

] , "only" ,<br />

s e l f . r u n I n f o ( ) [ "time" ] )<br />

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

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

Saved successfully!

Ooh no, something went wrong!