Forcing the value of a point in internal Domain to remain fixed.
1 Attachment(s)
Hello dear Foamers,
I am developing a twophase flow solver where I solve species balance (binary mixture) for both phases; YlEqn and YgEqn. Lets take the YgEqn as an example: Code:
fvScalarMatrix YgEqn what I want to do now is to force yg to be equal to ygi (which I calculate from an external function) on the interface. so basically it is like a fixed value boundary condition, but inside the domain and not on the boundary. the good point is that I know where inside the domain and which cell, but I am not sure how I should force it's value to remain constant and not be affected by the other cells. Any hint would be really appreciated. |
Possibly, ExplicitSetValue is what you need.
Code:
fvScalarMatrix YgEqn |
Quote:
Thank you so much for your reply, I actually thought of that at the beginning, but the point is that these values of Ygi are a function of P and T and I solve also energy equation and these values should get updated on runtime after energy equation is solved in each timestep. Yg[celli]=Function_Ygi(T[celli],p[celli]) where celli is the index of the cells where there is interface. So I need to force the values of Yg to be Ygi from the solver. Can you think of any way to revise the YgEgn in the solver to do that? Once again I really appreciate your help. Happy Easter :) |
How about this?
I figured out something but I am not sure if it is correct or not, I read on another post that this should work like this by using "setValues":
Code:
fvScalarMatrix ygEqn Any idea what am I doing wrong? Code:
forAll(alpha2,celli){ |
What is the code between the snippets from your latest post? ygi might somehow be modified there or something?
|
Quote:
Thank you so much |
All times are GMT -4. The time now is 05:56. |