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

msha solve Eqn programming in C using FOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 27, 2007, 06:59
Default Any Help is deeply appreciated
  #1
Member
 
Mojtaba Shahmohammadian
Join Date: Mar 2009
Posts: 73
Rep Power: 17
msha is on a distinguished road
Any Help is deeply appreciated;

I have these

volSymmTensorField R;
volSymmTensorField P = - twoSymm(R & fvc::grad(U_));
volScalarField G = 0.5 * tr(P);
solve (R == 2*I/3 - G*(P+2*I)) ;

written in foam file.
but in compile I recieve following error:

"invalid use of void funcion"

it seems that "solve" does not work in this way.

what can I do to solve an "implicit algebraic matrix equation" like this(i.e. without div,grad,laplacian,... )?
msha is offline   Reply With Quote

Old   December 27, 2007, 07:14
Default You cannot do: volSymmTensorFi
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
You cannot do: volSymmTensorField R; : the field does not allow a null constructor.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   December 30, 2007, 03:39
Default volSymmTensorField R; is only
  #3
Member
 
Mojtaba Shahmohammadian
Join Date: Mar 2009
Posts: 73
Rep Power: 17
msha is on a distinguished road
volSymmTensorField R; is only a declaration in header file not in C++ source file
msha 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
Solve Simple foam for laminar flow nandiganavishal OpenFOAM Running, Solving & CFD 4 January 20, 2009 01:56
RSMEARSM MSHA msha OpenFOAM Running, Solving & CFD 4 January 21, 2008 01:32
msha solve Eqn programming in C using FOAM msha OpenFOAM Running, Solving & CFD 2 January 6, 2008 08:03
Which Solver MSHA msha OpenFOAM Running, Solving & CFD 2 October 15, 2007 12:04
Can the FOAM solve the conjugate heat transfer problem ztdep OpenFOAM Running, Solving & CFD 1 September 15, 2005 15:26


All times are GMT -4. The time now is 18:51.