|
[Sponsors] |
Comparison between fvc::ddtPhiCorr and fvc::ddtCorr (old solver recreation) |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
ScalarVectorTensor
Join Date: Mar 2020
Posts: 4
Rep Power: 6 ![]() |
Hello Foamers
Just a quick one today hopefully, I am working on “resurrecting” some old solvers written by a colleague which were made on openFoam 2.1 to openFoam 6 so they can be later modified. The solvers seem to be based on the openFoam 2.1 version of buoyantBoussinesqPimpleFoam. Everything is going ok apart from one function. The equation in the old solver is as follows. phi = (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rAU, U, phi); Attempting to run on openFoam 6 generates an error message stating that ddtPhiCorr is not a recognised part of fvc and did I intend to use fvc::ddtCorr. However using the equation phi = (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtCorr(rAU, U, phi); results in an error stating that the units of phi are incorrect when the solver is ran. I decided to consult the openFoam 2.3 version of buoyantBoussinesqPimpleFoam as this is where I believe the function fvc::ddtPhiCorr was removed from openFoam. I found that the equation is surfaceScalarField phiHbyA ( "phiHbyA", (fvc::interpolate(HbyA) & mesh.Sf()) + rAUf*fvc::ddtCorr(U, phi) + phig ); As can be seen the first term is exactly the same in both versions, but the second term is rAUf*fvc::ddtCorr(U, phi) using the equation phi = (fvc::interpolate(U) & mesh.Sf()) + rAUf*fvc::ddtCorr(U, phi); enables the solver to compile and run successfully. One important thing to note is that rAUf has the same definition in both versions of surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); Also the appearace of phig in the second equation but not in the first equation should not be a concern as the same term phig= rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf() is added at a later point in the older version. In short I just need to know if (fvc::interpolate(HbyA) & mesh.Sf()) + rAUf*fvc::ddtCorr(U, phi) == (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rAU, U, phi) hence does rAUf*fvc::ddtCorr(U, phi) == fvc::ddtPhiCorr(rAU, U, phi). Thanks, ScalarVectorTensor |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Omar
Join Date: Apr 2024
Posts: 15
Rep Power: 2 ![]() |
Hello,
i am suffering the same exact problem as yours.Did you happen to find a solution ?? I would be grateful for your reply |
|
![]() |
![]() |
![]() |
|
|