|
[Sponsors] |
March 26, 2008, 01:39 |
Hi,everyone! I want to add the
|
#1 |
New Member
yinyajun
Join Date: Mar 2009
Posts: 2
Rep Power: 0 |
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.
|
|
March 31, 2008, 18:01 |
Setting a constant in the code
|
#2 |
Member
David P. Schmidt
Join Date: Mar 2009
Posts: 72
Rep Power: 17 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Modify the htc using UDF on NT | frederic | FLUENT | 1 | February 24, 2020 00:26 |
2D Wave Eqution | bhuve | OpenFOAM Running, Solving & CFD | 0 | March 6, 2008 03:41 |
eqution of adsorption | karim | FLUENT | 1 | March 1, 2006 12:58 |
concentration eqution | Jason | FLUENT | 3 | April 28, 2004 23:24 |
How to modify a value by a UDF? | jwt | FLUENT | 3 | May 23, 2003 13:01 |