|
[Sponsors] |
![]() |
![]() |
#21 |
Senior Member
Join Date: Jul 2019
Posts: 148
Rep Power: 7 ![]() |
Hi,
I use 4 PIMPLE iterations. The pyFoamPlotWatcher shows the residuls of the first PIMPLE iteration only. I am wondering how would I display the last PIMPLE iteration? Thanks. |
|
![]() |
![]() |
![]() |
![]() |
#22 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6 ![]() |
hello!
i am using ubuntu in a Wls from windows. i can not make work pyFoamPlotWatcher. i have installed already python 3(sudo apt-get install python3), and it does not find the command Quote:
any idea? thanks |
||
![]() |
![]() |
![]() |
![]() |
#23 |
Member
Hasan Celik
Join Date: Sep 2016
Posts: 64
Rep Power: 9 ![]() |
Hello. Can you verify that PyFoam is installed and works correctly in your system? You can do that by evoking
Code:
python Code:
python3 Code:
import PyFoam import PyFoam.FoamInformation print PyFoam.FoamInformation.foamTutorials() Code:
/opt/openfoam7/tutorials Code:
pyFoamPlotWatcher.py log1 |
|
![]() |
![]() |
![]() |
![]() |
#24 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6 ![]() |
Quote:
already doing python3 and after import PyFoam i get Code:
Python 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import PyFoam Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'PyFoam' franco |
||
![]() |
![]() |
![]() |
![]() |
#25 | |
Member
Hasan Celik
Join Date: Sep 2016
Posts: 64
Rep Power: 9 ![]() |
That's okay. You just need to install it using pip or pip3 whichever you have.
Code:
pip3 install PyFoam Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#26 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6 ![]() |
Quote:
Small (and last, i promise!) question, I am running my simulation from an Allrun file, is it possible to add the pyFoam to the Allrun file? can i run it before running the solver with adding " &"? or i am obligated each time i run the simulation to open another terminal and do it? (or "run ./Allrun &") best regards, franco |
||
![]() |
![]() |
![]() |
![]() |
#27 | |
Member
Hasan Celik
Join Date: Sep 2016
Posts: 64
Rep Power: 9 ![]() |
Hello, I would rather use RunFunctions if you are on a local computer.
Evoke it by Code:
. $WM_PROJECT_DIR/bin/tools/RunFunctions Code:
runApplication simpleFoam & Code:
runParallel simpleFoam & It will give you a log file called log.simpleFoam. Press enter and you will be back to your terminal then write Code:
pyFoamPlotWatcher.py log.simpleFoam When you need to kill the application, check top and it will give you PID number of the Openfoam application. Then, write kill PID_number. Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#28 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6 ![]() |
Quote:
thanks for the answer, yes, it is what i am doing actually using runParallel, my only doubt it was if i used the " &" at the end, it means that it continues running the script at the same time that it runs in this case, simpleFoam, so if there is a line after this that uses the results of simpleFoam it would give an error, no? to be more clear with an easier example: if i do: Code:
runApplication blockMesh & runApplication snappyHexMesh thanks |
||
![]() |
![]() |
![]() |
![]() |
#29 |
New Member
Join Date: Dec 2020
Posts: 26
Rep Power: 5 ![]() |
Hello,
I try to plot residuals on the fly using foamMonitor but this fails. (I'm on OFv2012 Ubuntu 20.04 WSL2) I run the command below: $ foamMonitor -l postProcessing/residuals1/0/solverInfo.dat which returns: $ foamMonitor: command not found Does anyone know how to solve this ? thank you |
|
![]() |
![]() |
![]() |
![]() |
#30 |
New Member
Join Date: Dec 2020
Posts: 26
Rep Power: 5 ![]() |
I follow your message. I think I have PyFoam installed as you can see below :
# $ pip3 install PyFoam Requirement already satisfied: PyFoam in ./.local/lib/python3.8/site-packages (2020.5) Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from PyFoam) (1.17.4) # but then there is that error: #$ import PyFoam import-im6.q16: unable to open X server `:0' @ error/import.c/ImportImageCommand/359. # what could be the issue ? thanks |
|
![]() |
![]() |
![]() |
![]() |
#31 |
New Member
King Rollan
Join Date: Feb 2024
Location: Philippines
Posts: 1
Rep Power: 0 ![]() |
Greetings!
I would like to revive this thread by saying that the code for residuals stated above does not output the final residuals, only the initial residuals. Does anyone have a fix for this? If it helps, I am running it on OpenFOAM.org v9. Cheers, King |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
plotting grid-wise residuals | defrak | OpenFOAM | 1 | May 20, 2015 03:30 |
[PyFoam] Plotting values (e.g. residuals) from all iterations with pyFoam | chriss85 | OpenFOAM Community Contributions | 5 | November 11, 2014 11:13 |
Plotting residuals | krembil | OpenFOAM Running, Solving & CFD | 2 | August 16, 2014 03:38 |
Plotting Residuals using HelyxOS | EFoster2 | OpenFOAM Running, Solving & CFD | 0 | February 17, 2014 20:05 |
Plotting Residuals | ata | OpenFOAM | 12 | July 8, 2011 02:50 |