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

How To Modify the eqution

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 26, 2008, 01:39
Default Hi,everyone! I want to add the
  #1
New Member
 
yinyajun
Join Date: Mar 2009
Posts: 2
Rep Power: 0
yinyajun436 is on a distinguished road
Hi,everyone! I want to add the V * dT/dx to the laplacian slover. And the V is the const value in the x direction. Thank you for hint .It is very good if there is a similar example.
yinyajun436 is offline   Reply With Quote

Old   March 31, 2008, 17:01
Default Setting a constant in the code
  #2
Member
 
David P. Schmidt
Join Date: Mar 2009
Posts: 70
Rep Power: 7
schmidt_d is on a distinguished road
Setting a constant in the code:

const dimensionedScalar hconst
(
"hconst",
dimensionSet(0, 2, -2, 0, 0, 0, 0),
800.0e3
);

Reading a constant from an input file, which is usually a better idea is easy. Just check out readTransportProperties.H for any of the CFD codes.

fvc::grad(T) would give you the gradient of T. You can dot this with a unit vector in the x direction. Set the constant vector xhat, similar to the scalar example above and do the dot product using the & operator. There might be a method of taking just the x component if you dig through the vector class, but I don't know off the top of my head.

-DPS
schmidt_d is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2D Wave Eqution bhuve OpenFOAM Running, Solving & CFD 0 March 6, 2008 02:41
eqution of adsorption karim FLUENT 1 March 1, 2006 11:58
concentration eqution Jason FLUENT 3 April 28, 2004 22:24
How to modify a value by a UDF? jwt FLUENT 3 May 23, 2003 12:01
Modify the htc using UDF on NT frederic FLUENT 0 February 7, 2000 07:51


All times are GMT -4. The time now is 08:01.