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

Source Term implementation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 24, 2006, 20:37
Default I am confusing about the sourc
  #1
liton
Guest
 
Posts: n/a
I am confusing about the source term implementation. I have a fixed value source term (suppose 100) and want to use it in a diffusive equation. I have implemented as follows:

..
volScalarField SS=100
..
..
solve(Eqn==-fvm::Sp(SS))

But the compiler does not accept this syntax. Can anyone please help me?
  Reply With Quote

Old   December 25, 2006, 11:24
Default You just need to put "100" in
  #2
New Member
 
diego n.
Join Date: Mar 2009
Posts: 17
Rep Power: 17
diegon is on a distinguished road
You just need to put "100" in the rhs of the equation without creating a new vol field that cannot be initialized in the way you are doing.
diegon is offline   Reply With Quote

Old   December 25, 2006, 18:39
Default Hi diego Thanks for your su
  #3
liton
Guest
 
Posts: n/a
Hi diego

Thanks for your suggestion. If I follow like you, the equation would be:

solve(Eqn==100)

But still, I am getting error message.

Liton
  Reply With Quote

Old   December 26, 2006, 19:56
Default I have modified my code and fi
  #4
liton
Guest
 
Posts: n/a
I have modified my code and finally compiled the code without any error. I have defined my source term as dimensionedScalar, then I have implemented the source term like following:

fvScalarMatrix UEqn
(
fvm::laplacian(kappa,T)
);
solve(UEqn ==-fvm::Sp(source, T)) // T is variable

The solution that I got from this equation is terrible. Could some one please tell me, what's wrong I have done?
  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
UDF Source Term Christian FLUENT 4 August 1, 2009 06:53
How can I add a source term danielle OpenFOAM Running, Solving & CFD 1 February 29, 2008 12:52
Source term mayur FLUENT 0 August 10, 2004 14:23
Source Term Prakash Verma FLUENT 1 August 6, 2004 10:56
source term zwdi FLUENT 2 May 26, 2004 11:34


All times are GMT -4. The time now is 02:44.