CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

BC coefficients evaluation functions

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

LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2006, 04:55
Default Hi all, I'm trying to solve
New Member
Join Date: Mar 2009
Posts: 15
Rep Power: 17
shrina is on a distinguished road
Hi all,

I'm trying to solve a model with different populations of particles, each solved on its relative mesh ,representing its space state (every number density function is an object of the GeometricField class relative to a particular mesh object). So in the solver I solve different fields, each relative to a particular mesh.
In some of these meshes there is the V coordinate axis (V=4/3*pi*r^3) that gives the position of the particle in the physical space (I have a spherical simmetry and the position of the particle at coordinate r is expressed by coordinate V=4/3*pi*r^3, that is the enclosed volume that corresponds to that radial position).
I expressed all the equations in function of the new spatial variable V, but they all give a punctual, not averaged information: a number density function at position V, that's to say at its relative r position.
I used that coordinate because the integration along the V axis of the number density function corresponds to its integration in the physical space.

Along the physical axis V I have to represent 2 interfaces.
As a matter of fact I have to represent 3 regions along the spatial axis, region 1, 2, 3 (region 2 is between region 1 and 3).
So I decided to spilt each mesh with the V axis in three meshes and impose the interface conditions on the patches that connect these regions.
On these boundaries belonging to region 1 and 3 I express the gradients as a function of the gradients found for the patches of region 2 (using the condition of same fluxes of region 2 at the interfaces).
For region 2 I have to determine the gradients at these boundaries by the calculs, but at the same time I have to impose BCs.
So I decided to impose that the gradient on each of these boundaries is equal to the gradient on its nearer internal face (that's to say a linear profile of the field in the two last cells, on each side of region 2 ). So, for every patch of these, I need to express the value on the border as a function of the nodal values of the field in the cell near the patch and in the neighbour cell.

I wrote the evaluation functions for the class I created for that kind of BC, but I have problems with the coefficients evaluation functions.
Now not only the source and diagonal coefficients are to be returned, but also the one relative to the value of the field in the neighbour cell.

What should that function be like?
How can I see which is the position of that coefficient in the relative fvMatrix?
Are the equations (in the system) ordered in the same manner as the List of cell centres?

Thanks a lot in andvance

shrina is offline   Reply With Quote

Old   October 9, 2006, 05:02
Default Well, to be gentle, I need to
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Well, to be gentle, I need to start by saying that you are trying to do pretty advanced stuff: if you want to write the b.c. form basic principles you will need to study the way the coefficients are handled in the fvMatrix (with delayed addition to diagonal and rhs).

Fortunately, in most cases, this is not necessary: you can derive your b.c. from a fixedGradient or mixed condition, adjust the value or the gradient based on the reasoning you have given and rely on the base type to do the rest for you.

Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting:
hjasak is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Grad evaluation cfdmarkus OpenFOAM Bugs 2 July 16, 2009 18:54
density evaluation raffap Siemens 1 May 23, 2007 16:13
hardware- evaluation Ben CFX 5 November 15, 2004 03:27
damping functions(wall functions) Pr Main CFD Forum 0 March 22, 2004 02:17
Evaluation of utau Tim Main CFD Forum 1 February 10, 2004 12:24

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