CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   PimpleFoam solver modification (https://www.cfd-online.com/Forums/openfoam-programming-development/193325-pimplefoam-solver-modification.html)

miha23 September 22, 2017 03:36

PimpleFoam solver modification
 
Dear Foamers,

I'm a very new openfoam user, trying to simulate channel flow with pimpleFoam solver. But I would like to add two extra things:
1. A constant pressure gradient to Navier-Stokesequation , which moves the flow, like gravity. I know that fvOptions is just good for it, but could anyone give me a short intro of it, and what kind of momentum source should I use here? I've tried vectorCodedSource but I'm not sure that this is the right way.
2. And second, I tried to add a passive scalar transport equation. I think I just did the appropriate changes in the solver ( thanks to https://www.cfd-online.com/Forums/op...tml#post404356 ), but I am not sure what changes should I make in the case file.

Thanks for everyone who comments.

Gabor

Elliptic CFD October 16, 2017 13:17

Quote:

Originally Posted by miha23 (Post 665232)
Dear Foamers,

I'm a very new openfoam user, trying to simulate channel flow with pimpleFoam solver. But I would like to add two extra things:
1. A constant pressure gradient to Navier-Stokesequation , which moves the flow, like gravity. I know that fvOptions is just good for it, but could anyone give me a short intro of it, and what kind of momentum source should I use here? I've tried vectorCodedSource but I'm not sure that this is the right way.
2. And second, I tried to add a passive scalar transport equation. I think I just did the appropriate changes in the solver ( thanks to https://www.cfd-online.com/Forums/op...tml#post404356 ), but I am not sure what changes should I make in the case file.

Thanks for everyone who comments.

Gabor


For the first question, use the meanVelocityForce as the driving force in the fvOptions file. You will need to specify the bulk velocity (velocity vector) in the Ubar dictionary. The bulk velocity of the channel flow will be used to calculate the pressure gradient to drive the plane channel flow (take a look at the meanVelocityForce source code). For an example of how the fvOptions file has to be specified, take a look at the channel395 tutorial found in tutorials/incompressible/pimpleFoam directory (or https://github.com/OpenFOAM/OpenFOAM...tant/fvOptions).

Your second question is not too clear though. If I am to make an attempt to answer the question, you need to specify the boundary conditions of the passive scalar in the 0/ directory. You also need to determine the numerical schemes for the passive scalar (and hence modify fvSolution and fvScheme files in the system/ directory of the case).


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