# How to implement source term?

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 May 5, 2006, 02:03 How to implement source term? #1 Amit Gupta Guest   Posts: n/a Hi everyone, I am a student of Metallurgical & Materials Engineering, Indian Institute of Technology Kanpur, India. Can anybody tell me that how to implement the source term like d/dx(k(d(phi)/dx)) where phi is other variable than c1,c3.. provided by phoenics. Is that i have to give whole term as a source in each cell by giving patch type cell....or i have to discritize it and give it as flux on east and west face (patch type east or west) If i have to discritize this source term then its unit will be changed. One more thing i am working on a trasient problem. Please help me!! Thanks in advance Amit Gupta

 May 10, 2006, 12:06 Re: How to implement source term? #2 Mike Guest   Posts: n/a It is not clear. What variable is being solved? Is it phi itself, or is the phi in the source term the subject of another transport equation? Also, what does the source term represent physically? The term looks diffusive in nature, but what does the term physically represent? In any event, you will need to represent the term by constructing fluxes into and out of the cell on the west and east faces, as appropriate.

 May 10, 2006, 23:04 Re: How to implement source term? #3 Amit Gupta Guest   Posts: n/a Thanks for the answer Mike ! I got your point that i have to specify source term as fluxes on east and west face but still I have some doubt. In my problem i am solving variable C1, that subject to a transport equation. In which i am using a source term k(d2(C3)/dx2), the subject of another transport equation for C3. (where k is some constant to maintain the unit consistency) You are absolutely right that it is diffusive in nature. How can I convert this term in fluxes into and out of the cell on the west and east faces. Please specify the term which i have to input as flux on east and west faces. Also please tell me how to linearize this type of term? Thanks again! Amit

 May 11, 2006, 05:18 Re: How to implement source term? #4 Mike Guest   Posts: n/a Off the top of my head: source = De*(C3,E-C3,P) + Dw*(C3,W-C3,P) (1) where E, W and P denote the east node, west node and current node location. The De and Dw are diffusive exchange coefficients evaluated at the east and west cell-faces, respectively. For example, De = k*area,e/(X,E-X,P)where k is the actual diffusion coefficient evaluated at the cell face by averaging from the nodal values of k. If k is uniform, then obviously no averaging is required. Equation (1) is already in the required form for linearisation, ie SOURCE=CO*(VAL-phi,p)*TYPE. Therefore, in the PHOENICS linearisation can be achieved by putting CO=De and VAL=C3,E, etc There are several ways to implement this in PHOENICS, but without much thought as to the detail, I can imagine two PATCHes, of say area type, with CO=GRND and VAL=GRND. In GROUND, you then set CO and VAL as required.

 May 11, 2006, 08:07 Re: How to implement source term? #5 Mike Guest   Posts: n/a No, my proposed linearisation is not right, because obviously phi,p=C1,P, and not =C3,P. I think you can probably linearise each face term by checking on the sign, and if it is negative, use CO=face term/(C1,lim-C1,P) & VAL=C1,lim. Since C1,lim is a concentration, an obvious choice for the C1,lim is zero. This might prove stiff numerically if C1,P tends to a small concentration. If the flux term is +ve, you can simply introduce the flux term explicity, iei CO=FIXFLU and VAL=flux term.

 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 chris1980 OpenFOAM Running, Solving & CFD 10 August 27, 2007 06:04 mech FLUENT 0 May 6, 2006 03:51 tian FLUENT 3 May 2, 2003 09:17 Allan CD-adapco 0 September 21, 2001 10:51 Mark Richardson FLUENT 1 August 21, 2001 04:41

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

 Contact Us - CFD Online - Top