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

fvMatrix (my code is working, but why?!)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2014, 10:10
Question fvMatrix (my code is working, but why?!)
  #1
New Member
 
Join Date: Jul 2014
Posts: 13
Rep Power: 11
P1361 is on a distinguished road
Hi everybody,

I have always thought that when defining a fvMatrix for an equation([a][x] = [b]), the matrix of coefficients ([a]) is introduced using fvm:: operators and everything that goes to the source vector ([b]) should be a geometric field of the same type as the unknown [x] (at least according to the programmers guide).

BUT when trying to add a source term to my energy equation, I used a scalar (not a volScalarField) and it worked!

The implementation is as bellow:

fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(alpha, T)
+ Q
);

where Q has already been defined as:

dimensionedScalar Q
(
transportProperties.lookup("Q")
);


How is it possible?! Could somebody explain me a little bit plz?

Many thanks,

P
P1361 is offline   Reply With Quote

Reply


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
COBRAS code novan tofany Main CFD Forum 0 October 8, 2012 04:40
Femlab: why isn't this code working? Max COMSOL 2 April 9, 2008 09:35
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 15:56
What is the Better Way to Do CFD? John C. Chien Main CFD Forum 54 April 23, 2001 08:10
own Code vs. commercial code Bernhard Mueck Main CFD Forum 10 February 16, 2000 10:07


All times are GMT -4. The time now is 16:04.