|
[Sponsors] |
March 27, 2001, 22:46 |
User Scalar B/C
|
#1 |
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, 06:29 |
Re: User Scalar B/C
|
#2 |
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, 19:55 |
Re: User Scalar B/C
|
#3 |
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, 12:10 |
Re: User Scalar B/C
|
#4 |
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, 21:16 |
Re: User Scalar B/C
|
#5 |
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, 23:29 |
Re: User Scalar B/C
|
#6 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dieselFoam problem!! trying to introduce a new heat transfer model | vivek070176 | OpenFOAM Programming & Development | 10 | December 24, 2014 00:48 |
User defined scalar boundary condition | Philip | FLUENT | 1 | December 4, 2013 11:23 |
solving passive scalar by user function in AVLFIRE | huyp | Main CFD Forum | 0 | September 4, 2008 11:21 |
add user scalar in one phase | zhu | CFX | 0 | April 27, 2002 04:45 |
Using user scalar in USRRAT | Jakub | CFX | 0 | April 25, 2002 14:18 |