CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Gradient schemes and backward second order time scheme (https://www.cfd-online.com/Forums/openfoam-solving/116866-gradient-schemes-backward-second-order-time-scheme.html)

callumso April 26, 2013 12:17

Gradient schemes and backward second order time scheme
 
Hi,

I read from the user guide that the gradient scheme could be just Gauss plus an interpolation scheme. Then I tried to do something as below:

gradSchemes
{
default Gauss linear;
grad(p) Gauss limitedLinear 1;
grad(U) Gauss limitedLinear 1;
}

And I got the following error message:

--> FOAM FATAL IO ERROR:
wrong token type - expected word, found on line 27 the label 1

file: /home/ttjs3/OpenFOAM/ttjs3-2.1.1/run/duct1/system/fvSchemes::gradSchemes::grad(U) at line 27.

From function operator>>(Istream&, word&)
in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting

I don't know what kind of parameter should follow "Gauss limitedLinear 1" in such a case. I am still virtually illiterate about C++ and can't really understand how to dig out the information in the relevant code as I am really baffled by all the class definitions, selectors and so on...

Could someone give me on hint on what I have done wrong in this setting? Thank you very much.

Actually I got another problem with the second order backward time scheme. I am testing it on a simple straight duct case.

It's just never stable...and I don't know why. My CFL number is as low as 0.001. Increasing it further just made the simulation blow up in a few time steps. Reducing it can help to make the simulation run longer, but still not stable.

Does anyone have any experience on this backward second order scheme? Thank you.

Best Regards,
Callum

callumso August 13, 2013 07:01

Second order time scheme
 
I managed to use the second order time scheme with rhoPimpleFoam. It seems it's not really working well with sonicFoam, which I used in my previous post.

zqlhzx August 13, 2013 22:52

The UEqn.H in firepoolFireFoam
 
Hi Foamers:
According to the following codes in UEqn.H:
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
==
parcels.SU(U)
);
UEqn.relax();
if (pimple.momentumPredictor())
{
solve
(
UEqn
==
fvc::reconstruct
(
(
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
)*mesh.magSf()
)
);
}
The momentum equation that the smallpoolFire2D sloves is
fvm::ddt(rho, U)+ fvm::div(phi, U)+ turbulence->divDevRhoReff(U)
==parcels.SU(U)+fvc::reconstruct((- ghf*fvc::snGrad(rho)- fvc::snGrad(p_rgh))*mesh.magSf()).
I understand all term in the equation except the term of "parcels.SU(U)".
In many example in OF,there is no term of "parcels.SU(U)" in UEqn.H.How can understand the term?Is there any theory about the term?
please some foamers know tell me.I really need help!
Thank you!:)

sourav90 April 16, 2021 12:31

Meaning of Parcels.SU(U)
 
Quote:

Originally Posted by zqlhzx (Post 445565)
I understand all term in the equation except the term of "parcels.SU(U)".
In many example in OF,there is no term of "parcels.SU(U)" in UEqn.H.How can understand the term?Is there any theory about the term?
please some foamers know tell me.I really need help!
Thank you!:)

Hi Zqlhzx, I have the same questions too, since I need to modify a solver & need to understand what this term stands for. Have you found any explanation for this?

sourav90 April 19, 2021 09:36

SU() represents coupling of particles with fluid flow
 
Quote:

Originally Posted by sourav90 (Post 801746)
Hi Zqlhzx, I have the same questions too, since I need to modify a solver & need to understand what this term stands for. Have you found any explanation for this?

Found it. This is well explained in Chalmers courses in 2013, in this pdf:
http://www.tfd.chalmers.se/~hani/kur...ing_report.pdf:D


All times are GMT -4. The time now is 21:02.