Adding source term involving derivative in y direction
I want to add a new transport equation to simpleFoam.
The source term looks like Sw = nu/pow(y,2) * dw/dy
where y is the y-coordinate of the cell and
dw/dy is the derivative in the y-direction.
- fvm::laplacian(nu, w)
My confusion is to get the derivative in a one direction not to calculate the
Can anybody give me an idea how to achieve this.
If i'm correct you may get the gradient only in the explicit way which would be:
then you can extract the desired component by:
I may not be correct in spelling or own the best way, but this should work
Thankyou for giving time to answer. I also thought the same and
it works fine.
But now I have another problem. I have a term
Sw = (Uy * w)/y
where Uy is the y component of velocity
and y coordinate.
Can this term be put in UwEqn as,
Just from the top of my head, when you are using the SIMPLE every equation is being solved separately, also in source term of your equation for UwEqn there is no Uw (Uy is being considered known from previous step) so I think there would be no difference if you use fvm or mention it explicitly
I tried to put the term
Sw = (Uy * w)/y
with fvm::Sp and explicitely. but in both cases the value of Sw tends to infinity
after 500 iterations approximately.
I am using OpenFOAM-1.6-ext. I am simulating a 2D axisymmetric case.
Where this new transport equation calculates the swirl-component
Please have a look at the file.
If you want the whole case file, I can also send you that...
I'm not sure how this affects your stability, All I'm saying is that with the solver you chose this term would have same effect explicitly or implicitly on the solution.
|All times are GMT -4. The time now is 23:28.|