Using fvOption for adding momentum
3 Attachment(s)
Dear friends
I am using fvOption to add extra momentum in the domain and I use fvOption for this purpose, but It does not work properly. my fvOption is as follow; Code:
/*--------------------------------*- C++ -*----------------------------------*\ Do you know what is my mistake? I have attached my cellZone, and also my simulation which I expect to make difference but fvOption has no effect. |
I was able to do something similar like so and it was working, hope this help:
Code:
fixU |
Dear René Thibault
Thanks for your reply. Could you please tell me that if there is any fvOption(U) in your solver? I mean in Ueqn.C? Thanks, Farzad Quote:
|
What exactly does this code is fixing the component 'x' of 'U' at the first cell (I was setting a cellZone on the entire domain on the first cell from the wall with a topoSetDict file and using 'topoSet' command, like you probably did in a similar fashion way) at a fix value of 1.458..... At every time step, the value is carry on and fixed at this value at the cellZone set already.
By using the type 'vectorFixedValueConstraint', apparently you don't need to use the form 'vectorField& uSource = equ.source()' to apply the fixed value. Perform a test, and you'll see in your writing folder under 'U' file that the value will stay fix, the same, during the whole simulation in your cellZone. To answer your question about 'fvOption(U)' and 'Ueqn.C', that is a good question. The only thing that I can answer is I used the standard k-epsilon solver and didn't modify anything in the solver. Plus, is it possible to use this same technique with scalar value, like 'k' and 'epsilon' by using the type 'scalarFixedValueConstraint'. If you want to use an equation, maybe this post could help: https://www.cfd-online.com/Forums/op...-equation.html Regards, |
Could anyone give me a good reference for fvOption usage in OpenFOAM?
|
Dear René Thibault
Thank you very much for your answer. I am using DPMFoam and according to below thread; https://www.cfd-online.com/Forums/op...tml#post784672 There is no fvOption in the Ueqn.C(Uceqn.C), and I need to add it to my solver, but I have not tested it yet. According to previous thread, adding fvOption is not enough and I have to do another actions also. Thanks, Farzad Quote:
|
I use OpenFoam v1906 and I looked into 'DPMFoam.C' file and there is in fact, no 'fvOptions' framework.
Good luck with your work. Regards, |
Dear René Thibault
Finally I decided to code instead of using fvOption, and I did the coding and I have add externalMomentum to the momentum equation in that specific region like this; Code:
forAll(mesh.C(),i) Code:
ExMom.H:10:22: error: no match for ‘operator=’ (operand types are ‘Foam::Vector<double>’ and ‘double’) Thanks, Farzad Quote:
|
Code:
(1.0 ,0.0 ,0.0) Code:
externalMomentum[i] Code:
vector(1.0, 0.0, 0.0) |
I agree with Joachim.
|
Thanks, It is solved.
Farzad Quote:
|
|
All times are GMT -4. The time now is 11:26. |