CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   flux source at particular location(boundary) (https://www.cfd-online.com/Forums/cfx/89010-flux-source-particular-location-boundary.html)

cprasad111 June 1, 2011 09:16

flux source at particular location(boundary)
 
Hi.
I need to find the derivative of a variale (reactant.molconc) at particular location(x=0.002) which i m able to do it and then specify two sources, NEGATIVE SOURCE at left of the location and POSITIVE SOURCE at the right of the location, where source is some simple function of the gradient of the reactant.molconc .
The geometry is simple reactangle with a boundary at x=0.002
I thougt of a way but don't know(90% sure that it won't work) if it will work
the part of the code i written is :
DO ILOC = 1, NLOC
IF (X(ILOC).GE.0.002 .AND. X(ILOC).LE.0.002 .AND.
& Y(ILOC).GE.0.00 .AND. Y(ILOC).LE.0.001) THEN
SOURCE(ILOC-1) = -(1e-9)*GRAD_PHI(1,ILOC)
SOURCE(ILOC+1) = (1e-9)*GRAD_PHI(1,ILOC)
END IF
END DO
but i m not sure if ILOC-1 will be just left of the location and ILOC+1 at the right of the boundary. The problem is how the vertices are assigned to NLOC..
Plz help on this...Suggest some other and better ways to do the same.

baserinia June 1, 2011 11:59

Quote:

Originally Posted by cprasad111 (Post 310129)
Hi.
but i m not sure if ILOC-1 will be just left of the location and ILOC+1 at the right of the boundary. The problem is how the vertices are assigned to NLOC..

No, it's not going to work. ILOC has nothing to do with the physical location of a vertex. More importantly, you cannot define a point or line source in the finite volume method. You should add your source like the "User Defined Momentum Source" example in the documentation.

ghorrocks June 1, 2011 18:27

Why can't you use the built in CEL gradient functions?

cprasad111 June 2, 2011 01:58

@ Baserinia

Yes, I have read the "momentum source" from the documentation. But the unit of momentum source is kg m^-2 s^-2 and the unit i need is kg m^-2 s^-1. So, it is giving some error.

Also there is only option of momentum source, no option of mass flux source which i need.

ghorrocks June 2, 2011 02:21

Use a mass source then. And your comment about the momentum source shows your momentum source units are wrong.

.... And why not use the built in CEL gradient functions?

cprasad111 June 2, 2011 03:22

But even the mass source unit is kg m^3 s^-1, i need mass flux source kg m^2 s^-1

We are also trying other things and going through the built in CEL function too. Thanks


All times are GMT -4. The time now is 13:32.