CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Can't get residual plot for K and Omega ?!!! (https://www.cfd-online.com/Forums/openfoam/217607-cant-get-residual-plot-k-omega.html)

losiola May 18, 2019 08:12

Can't get residual plot for K and Omega ?!!!
 
Hello foamers,
I am making a simulation using the komega sst turbulence model and i am monitoring the residuals in real time but unfortunately i only get plots for the P Ux and Uy but cant get residual plots for the K and Omega ?! is there any suggestiong about how to resolve this issue?!!

HenrikJohansson May 22, 2019 03:04

Hi,

Is the turbulence turned on?
How are you monotoring your residuals?
We need more information to help you. Read the following post if you wan't better help with our problems in the future: https://www.cfd-online.com/Forums/op...-get-help.html

Your problem can probably be solved by reading this thread: https://www.cfd-online.com/Forums/op...residuals.html

losiola May 22, 2019 04:26

Quote:

Originally Posted by HenrikJohansson (Post 734391)
Hi,

Is the turbulence turned on?
How are you monotoring your residuals?
We need more information to help you. Read the following post if you wan't better help with our problems in the future: https://www.cfd-online.com/Forums/op...-get-help.html

Your problem can probably be solved by reading this thread: https://www.cfd-online.com/Forums/op...residuals.html




Thank you for the Reply ,
in order to plot the residuals i have inserted this line in the controlDict File the flowing line

functions
{
#includeFunc residuals

}


Code:

application    pimpleFoam;

startFrom      latestTime;

startTime      0;

stopAt          endTime;

endTime        5;

deltaT          1e-5;

writeControl    adjustableRunTime;

writeInterval  1e-2;

purgeWrite      0;

writeFormat    binary;

writePrecision  10;

writeCompression off;

timeFormat      general;

timePrecision  6;

runTimeModifiable true;

adjustTimeStep  yes;

maxCo          0.9;

functions
{
#includeFunc residuals
 forces
    {
        type                forces;
        libs                ("libforces.so");
        writeControl        timeStep;
        writeInterval      10;
        patches            (wing);
        rho                rhoInf;
        log                true;
        rhoInf              1.2047;
        CofR                (0 0 0);
    }
forceCoeffs1
{
    // Mandatory entries
    type            forceCoeffs;
    libs            ("libforces.so");
    patches        (wing);


    // Optional entries

    // Field names
    p              p;
    U              U;
    rho            rhoInf;
    rhoInf        1.2047;
  // rhoInf            1.204;
    // Reference pressure [Pa]
    pRef            0;

    // Include porosity effects?
    porosity        no;

    // Store and write volume field representations of forces and moments
    writeFields    yes;

    // Centre of rotation for moment calculations
    CofR            (0 0 0);

    // Lift direction
    liftDir        (0 1 0);

    // Drag direction
    dragDir        (1 0 0);

    // Pitch axis
    pitchAxis      (0 0 -1);

    // Freestream velocity magnitude [m/s]
    magUInf        10.578;

    // Reference length [m]
    lRef            1;

    // Reference area [m2]
    Aref            1;

    // Spatial data binning
    // - extents given by the bounds of the input geometry

}
}


and In order to monitor the Residuals during the simulation runtime i use the command

Code:

foamMonitor -l -r 1 postProcessing/residuals/0/residuals.dat &
this command allows me to monitor the residuals in real time while the simulation is runing using gnuPlot .


but as i said before the only curves i get are only for p Ux Uy and i dont get plots for k and Omega also the strange thing is once i directly open the file /postProcessing/residuals/0/residuals.dat i only can see residuals for P Ux and Uy and there is no sgine for the k and Omega residuals.










Hope you can help me

HenrikJohansson May 22, 2019 10:23

Hi,

I have never used that way to plot the residuals.
I use either the way stated in the link I posted or using pyFoam:
Code:

pyFoamPlotRunner.py theSolverIamUsing
Both ways have worked for RANS and laminar flows for me. Never used LES in OpenFOAM.

mzzmrt May 23, 2019 07:20

read the manual: "The default fields whose residuals are captured are p and U. Should the user wish to configure other fields, they should make copy the residuals file in their system and edit the fields entry accordingly..


https://cfd.direct/openfoam/user-gui...hs-monitoring/

yasmine July 25, 2022 06:23

Hi, could you please solve this problem? I am in the same case.
I would appreciate any help.
Thanks in advance.

yasmine July 25, 2022 06:27

Can't get residual plot for K and Omega
 
Hello foamers,
I am making a simulation using the komega sst turbulence model and i am monitoring the residuals in real time but unfortunately i only get plots for the P Ux and Uy but cant get residual plots for the K and Omega ?! is there any suggestiong about how to resolve this issue?!!

Thanks in advance.


All times are GMT -4. The time now is 15:27.