# User Scalar B/C

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 27, 2001, 21:46 User Scalar B/C #1 Greg Perkins Guest   Posts: n/a Does anyone know you to set a boundary condition for a user defined scalar, thi, as: d/dn(thi) = 0 ie gradient of the scalar at boundary is zero. According to the manual you can set: 1) thi = fixed value 2) flux of scalar = fixed value For the general scalar d/dxi(flux*thi) = S I assume that this second option (2) is flux*thi = fixed value. Has anyone come across this problem and worked outhouw to set d/dn(thi) = 0 at a boundary! Or used a udf to do it??? Any comments much appreciated. Regards Greg

 April 3, 2001, 05:29 Re: User Scalar B/C #2 Ola Nordblom Guest   Posts: n/a Hi Greg, Perhaps I have misunderstood your question, what kind of boundary do you have? At a wall boundary, a zero gradient of the scalar means no diffusive transport, and a prescribed zero flux of the scalar as in your option (2) should be correct and correspond to a zero-gradient normal to the boundary. For boundaries with convective transport I have no suggestion. Regards, Ola

 April 3, 2001, 18:55 Re: User Scalar B/C #3 Greg Perkins Guest   Posts: n/a Yeah Ola, I forgot to mention that I want to apply this boundary condition at an inlet or outlet. In this case, I don't think that setting a zero flux of the scalar is the same as a zero gradient of the scalar at the boundary. Although, maybe I've missed something?? I should also mention I modify the flux term with a udf, so I don't use the normal flow flux for this scalar. Thanks Greg

 April 5, 2001, 11:10 Re: User Scalar B/C #4 Ola Nordblom Guest   Posts: n/a Hi again, If you can specify the boundary conditon so that no diffusive transport is included, then the b.c. should correspond to a zero gradient of the scalar. This should be true not only at walls, but at inlets and outlets as well. As usual, the manual doesn't describe exactly how diffusion is treated across different types of boundaries. At a velocity inlet, I think that you always get some diffusion when the boundary value of the scalar is given. To prevent diffusion you have to specify the transport as a flux instead and include only the convective part, i.e. rho*U*A*phi (in a UDF). Regards, Ola

 April 5, 2001, 20:16 Re: User Scalar B/C #5 Greg Perkins Guest   Posts: n/a Thanks Ola, I've had a bit more of a play and I appear to have got what I wanted to work - although just the first part. In my case I was using a UDF to calculate the convective flux - and not using the internal F_FLUX used by fluent - since I want to solve for another simple flow model. It turned out that I had the fluxes around the wrong way when applying a upwind scheme to determine face variables. These things are a bit hit and miss, since Fluent have provided no documentation on how to calculate these face fluxes and their direction conventions. For example the UDS_FLUX returns one face flux, but this must be positive for one cell and negative for the adjacent cell. But there's no explanation of how a positive/negative flux is interpreted by Fluent if you understand what I mean. So I had to resort to trial and error. In addition I also found that Fluent Inc tech support sent me an incorrect definition earlier which took a while to figure out. When these changes, it appears to work and I can get a zero gradient at the inlet/outlet boundary. In this case I set the diffusion co-efficient to zero. Greg

 April 5, 2001, 22:29 Re: User Scalar B/C #6 Greg Perkins Guest   Posts: n/a Thanks Ola, I've had a bit more of a play and I appear to have got what I wanted to work - although just the first part. In my case I was using a UDF to calculate the convective flux - and not using the internal F_FLUX used by fluent - since I want to solve for another simple flow model. It turned out that I had the fluxes around the wrong way when applying a upwind scheme to determine face variables. These things are a bit hit and miss, since Fluent have provided no documentation on how to calculate these face fluxes and their direction conventions. For example the UDS_FLUX returns one face flux, but this must be positive for one cell and negative for the adjacent cell. But there's no explanation of how a positive/negative flux is interpreted by Fluent if you understand what I mean. So I had to resort to trial and error. In addition I also found that Fluent Inc tech support sent me an incorrect definition earlier which took a while to figure out. When these changes, it appears to work and I can get a zero gradient at the inlet/outlet boundary. In this case I set the diffusion co-efficient to zero. Greg

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post vivek070176 OpenFOAM Programming & Development 10 December 24, 2014 00:48 Philip FLUENT 1 December 4, 2013 11:23 huyp Main CFD Forum 0 September 4, 2008 10:21 zhu CFX 0 April 27, 2002 03:45 Jakub CFX 0 April 25, 2002 13:18

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