CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   implementing boundary conditions (http://www.cfd-online.com/Forums/cfx/18314-implementing-boundary-conditions.html)

 Andreas Abdon February 5, 2000 09:52

implementing boundary conditions

Hello everybody!

I'm implementing boundary conditions on a user scalar equation in user fortran subroutine USRSRC. I want to assign the scalar a value in the near wall cells. The manual recommends the following procedure:

SP=-c SU=c*value AM=0 for all faces

where c is "set equal to approximately the maximum flux in the CV.. .. to stop potential errors due to the Rhie-Chow terms." (quote). I have tried this approach and also different constant values of c and found that it may distort the solution seriously, especially when the flux (velocity) is close to zero. Does anybody have a recommendation how to proceed? Is a large (1.0E10) value of c "safe" to use?

Greetings

Andreas Abdon

Div. Heat Transfer Lund Institute of Technology Box 118 22100 Lund Sweden

 Andreas Abdon March 14, 2000 14:00

Re: implementing boundary conditions

I'm stuck!

Even if you haven't come across these problems when implementing boundary conditions I would be grateful if you let me know how you did it. I have traced the problem to one of my equations, it's a diffusion eq. with NO CONVECTION. I have tried different c values and the high ones (like 1e10) gives a reasonable solution but slows down convergence seriously. A low value gives a very good convergence rate (final residual levels as for c=1e10) but the solution is not very good.

Andreas (...nervous breakdown coming soon)

 Andreas Abdon March 15, 2000 14:20

Re: implementing boundary conditions

----> I FOUND IT! <------

Don't use AM(NCELL,0,IPHASE) when putting AM=0 for all six facial components! You have to loop over each individual face: AM(NCELL,1,IPHASE)=0, AM(NCELL,2,IPHASE)=0,AM(NCELL,3,IPHASE)=0, and so on....

Doing this, the solution is the same for c=1.0 nd c=1.0e10, i.e. dependence of c value is eliminated.

Cheers

Andreas

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