CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Downwind (https://www.cfd-online.com/Forums/openfoam/74296-downwind.html)

lfbarcelo March 29, 2010 15:40

Can you set downwind cell centre value on faces?
 
I'm trying to modify the code in one of the solvers to suit it for my particular case.

In order to determine the velocity value in the faces of the finite volumes, the solver interpolates it's value in the cell centres.

mesh.Sf() & fvc::interpolate(U)

Instead of this interpolated value on the faces I need the downwind value on each face. This means that the face should not take an interpolated value between the cell centres, but the value corresponding to the downwind cell centre.

Is there a known function to do this?

Thank You.
Best Regards.

eugene March 30, 2010 04:29

Sure,

fvc::interpolate(U, word("Udownwind"));

And then add

Udownwind downwind;

to the interpolationSchemes section of the fvSchemes dictionary.

What is this for if I may ask?

lfbarcelo March 30, 2010 13:11

I did everithing you said and the application compiled perfectly but when I try to run the case I get the next error message:
--> FOAM FATAL IO ERROR:
attempt to read beyond EOF

file: /home/user/OpenFOAM/user-1.6.x/run/tanque/system/fvSchemes::interpolationSchemes::default at line 50.

From function ITstream::read(token& t)
in file db/IOstreams/Tstreams/ITstream.C at line 84.

FOAM exiting

Any Ideas?

lfbarcelo March 30, 2010 13:16

sorry, my mistake, this is the error message I get:

--> FOAM FATAL IO ERROR:
attempt to read beyond EOF

file: /home/user/OpenFOAM/user-1.6.x/run/tanque/system/fvSchemes::interpolationSchemes::Udownwind at line 51.

From function ITstream::read(token& t)
in file db/IOstreams/Tstreams/ITstream.C at line 84.

FOAM exiting

eugene March 31, 2010 05:51

Normally you get this error if there is a missing entry or ";". The code in downwind.H indicates that you need an entry for the name of the flux:

Udownwind downwind phi;

lfbarcelo April 1, 2010 09:12

Thanks eugene, both answers were really usefull. Downwind is working. I needed it to test different results in drift flux equations. The transport of alpha seems to work better, concerning mass conservation, when useing a downwind scheme.


All times are GMT -4. The time now is 07:32.