CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   setFields problems (https://www.cfd-online.com/Forums/openfoam-pre-processing/192123-setfields-problems.html)

Neshat August 29, 2017 02:31

setFields problems
 
Dear Foamers,
I am quite new to CFD simulations, specially OpenFoam, and I am trying to start with simple simulation.
I have an open channel with constriction in some parts, which fluid flows through it and I want to use interFoam solver in order to investigate flow field and the effect of these constrictions on water level surface. I know the velocity at the inlet and flow depth at the outlet. My main question is about alpha.water and setFeildsDict files.
1) what should I write for inlet in alpha.water file?
2) And I don’t know which box should I introduced in setFieldsDict file? Should I introduced a box which cover whole the channel? For example, I have a flume with 6m length and 1m width which flow depth is 0.3m. Should I write setFeildsDict as below?

defaultFieldValues
(
volScalarFieldValue alpha.water 0
);

regions
(
boxToCell
{
box (0 0 0) (6 1 0.3);
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);

Or I should only introduce a small box at the inlet and let this box flows through the channel? I mean:

defaultFieldValues
(
volScalarFieldValue alpha.water 0
);

regions
(
boxToCell
{
box (0 0 0) (0.5 1 0.3);
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);

So sorry for my very basic questions.
Best Regards
Neshat

nimasam September 2, 2017 01:15

Hi
both methods are possible :) and true, just continue simulation and see which one fit your purpose.

Neshat September 2, 2017 12:14

Thanks a lottt.
For the first question, I used zeroGradient for inlet, which seems OK.

m5m5kh September 3, 2017 07:34

Quote:

Originally Posted by Neshat (Post 662208)
1) what should I write for inlet in alpha.water file?

Dear Neshat
you can use both zeroGradient and inletOutlet boundary condition.

For your second question, I agree with Nima.

good luck!!


All times are GMT -4. The time now is 17:34.