CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM CC Toolkits for Fluid-Structure Interaction (https://www.cfd-online.com/Forums/openfoam-cc-toolkits-fluid-structure-interaction/)
-   -   [stressAnalysis] Residual plot for OpenFOAM-ext problem. (https://www.cfd-online.com/Forums/openfoam-cc-toolkits-fluid-structure-interaction/117454-residual-plot-openfoam-ext-problem.html)

gschaider July 3, 2014 15:52

Quote:

Originally Posted by Jibran (Post 499831)
Hmm, that is quite strange because it takes me directly to my post (#238 on last page of the thread)

Took mit to #111.

PyFoam should parse the stuff there

Which version of PyFoam do you use?

Jibran July 4, 2014 09:03

Quote:

Originally Posted by gschaider (Post 499948)
Took mit to #111.

PyFoam should parse the stuff there

Which version of PyFoam do you use?

I am using pyFoam-Version: 0.6.2

gschaider July 9, 2014 16:35

Quote:

Originally Posted by Jibran (Post 500104)
I am using pyFoam-Version: 0.6.2

I had a look. Some of the solid-solvers in foam-extend-3.x (I assume you're using one of those from the link you posted. Yourself you didn't say what you're using) have residual-output that is slightly different from the normal form and therefor the regular expression that looks for residuals is confused. You'll have to say which solver you're using (preferably also a tutorial case to reproduce). Then I can say whether it is possible to fix it (for the solvers that add information to the residual line I recommend a customRegexp)

Jibran July 11, 2014 10:48

Quote:

Originally Posted by gschaider (Post 500834)
I had a look. Some of the solid-solvers in foam-extend-3.x (I assume you're using one of those from the link you posted. Yourself you didn't say what you're using) have residual-output that is slightly different from the normal form and therefor the regular expression that looks for residuals is confused. You'll have to say which solver you're using (preferably also a tutorial case to reproduce). Then I can say whether it is possible to fix it (for the solvers that add information to the residual line I recommend a customRegexp)

Thanks for having a look Bernhard. Yes, I am using the one from the post (elasticSoldFoam) and the tutorial is 'plateHole'.

gschaider July 12, 2014 14:42

Quote:

Originally Posted by Jibran (Post 501158)
Thanks for having a look Bernhard. Yes, I am using the one from the post (elasticSoldFoam) and the tutorial is 'plateHole'.

OK. At first: when I run that tutorial it finishes after one time-step. So there will be on plot of the residuals anyway (you need at least 2 time-steps for that)

The other problem is that this solver has a non-standard format for the time ("Time: 1") and PyFoam therefor can not tell when one time-step starts. The good news is that this is configurable. Check with pyFoamDumpConfiguration.py:

Code:

[SolverOutput]
timeregexp: ^(Time =|Iteration:) (.+)$

You can override this by setting in one of the possible locations for configuration files (pyFoamVersion.py tells you about those. Look for "Configuration search path") to (this is untested)
Code:

[SolverOutput]
timeregexp: ^(Time =|Iteration:|Time:) (.+)$


Jibran July 14, 2014 07:38

Quote:

Originally Posted by gschaider (Post 501291)
The other problem is that this solver has a non-standard format for the time ("Time: 1") and PyFoam therefor can not tell when one time-step starts. The good news is that this is configurable. Check with pyFoamDumpConfiguration.py:

Code:

[SolverOutput]
timeregexp: ^(Time =|Iteration:) (.+)$

You can override this by setting in one of the possible locations for configuration files (pyFoamVersion.py tells you about those. Look for "Configuration search path") to (this is untested)
Code:

[SolverOutput]
timeregexp: ^(Time =|Iteration:|Time:) (.+)$


Many thanks Bernhard, I will have a look into it!

gschaider July 14, 2014 08:36

Quote:

Originally Posted by Jibran (Post 501409)
Many thanks Bernhard, I will have a look into it!

You're welcome. By "untested" I meant: the feature works. The regular expression I wrote is untested


All times are GMT -4. The time now is 18:34.