|
[Sponsors] |
[PyFoam] customRegexp with pyFoamPlotWatcher.py for force coefficents |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 27, 2017, 12:26 |
customRegexp with pyFoamPlotWatcher.py for force coefficents
|
#1 |
New Member
Join Date: Mar 2015
Posts: 12
Rep Power: 11 |
Hi,
I'm trying to make a custom regular expression for my force coefficients so I can plot them on the fly with pyFoamPlotWatcher.py, but I'm not really sure on how my customRegexp file should look like. Does anybody have an working example? My force coefficient output looks like this btw: Code:
forceCoeffs forceCoeffs output: Coefficients Cm : -2.34093e-05 (pressure: -2.32145e-05 viscous: -1.94815e-07) Cd : -0.010548 (pressure: -0.0105261 viscous: -2.18705e-05) Cl : -0.010548 (pressure: -0.0105261 viscous: -2.18705e-05) Cl(f) : -0.00529742 Cl(r) : -0.0052506 |
|
March 30, 2017, 09:06 |
|
#2 |
New Member
Join Date: Mar 2015
Posts: 12
Rep Power: 11 |
Anyone? Or can someone point me in a direction where I could find more resources for customregexp for pyfoam?
|
|
January 31, 2018, 12:15 |
|
#3 |
Member
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10 |
You can create one regexp for each line of your force coefficient output, and then use the new master-slave feature to merge all data into a single plot.
This is how your file customRegexp could look like: Code:
dragOF5 { theTitle "Forces"; expr "Cd += (%f%)"; titles ("Drag Coeff"); } dragOF5slave { expr "Cl += (%f%)"; titles ( "Lift Coeff" ); type slave; master dragOF5; } More info on how to create these files can be found here: http://openfoamwiki.net/index.php/Co...oam#New_format |
|
Tags |
customregexp, force coefficients, pyfoam, pyfoam customregexp, pyfoamplotwatcher.py |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[PyFoam] Using pyFoamPlotWatcher.py To Plot Residuals | m_ridzon | OpenFOAM Community Contributions | 22 | January 26, 2021 19:48 |
How to caculate the coefficents in sylindical sys | Kevin | Siemens | 1 | March 17, 2006 00:04 |