CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

How to add a source term like this!!

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2011, 01:51
Default How to add a source term like this!!
  #1
New Member
 
Arvind
Join Date: Mar 2009
Posts: 13
Rep Power: 17
arvind_arya is on a distinguished road
Hi dear fomers....i want to solve following equation-
ddt(Cp,T)-laplacian(K,T)=S0 where S0=Io*exp(-(x*x+y*y)) where S0 is a laser beam moving with 10 cm/s velocity.Now..i am stuck at how to model this source term??.
kindly give your valuable suggestions....

Thanks
arvind_arya is offline   Reply With Quote

Old   February 11, 2011, 03:34
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
is x the first array of position vector ?
if yes , you can access to position vector in cell center with mesh.C() and in cell face with mesh.Cf() so
volVectorField positionVector=mesh.C();
volScalarField x=positionVector.x();
volScalarField y=positionVector.y();
then source term would be
forAll (x,celli){
S0=(x[celli]*x[celli]+y[celli]*y[celli]);
}

i guess some things like above code can help you
nimasam is offline   Reply With Quote

Reply

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
problematic source term in UDS ak6g08 Fluent UDF and Scheme Programming 6 February 10, 2015 01:19
additional subdomain source term YJZ CFX 1 July 13, 2010 20:02
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
How can I add a source term danielle OpenFOAM Running, Solving & CFD 1 February 29, 2008 12:52
Add source term in species equation zhou1 FLUENT 1 October 21, 2003 07:28


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