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

msha solve Eqn programming in C using FOAM

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 27, 2007, 05:59
Default Any Help is deeply appreciated
  #1
Member
 
Mojtaba Shahmohammadian
Join Date: Mar 2009
Posts: 73
Rep Power: 7
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, 06:14
Default You cannot do: volSymmTensorFi
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,728
Rep Power: 20
hjasak will become famous soon enough
You cannot do: volSymmTensorField R; : the field does not allow a null constructor.

Hrv
__________________
Hrvoje Jasak
hjasak is offline   Reply With Quote

Old   December 30, 2007, 02:39
Default volSymmTensorField R; is only
  #3
Member
 
Mojtaba Shahmohammadian
Join Date: Mar 2009
Posts: 73
Rep Power: 7
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

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
Solve Simple foam for laminar flow nandiganavishal OpenFOAM Running, Solving & CFD 4 January 20, 2009 00:56
RSMEARSM MSHA msha OpenFOAM Running, Solving & CFD 4 January 21, 2008 00:32
msha solve Eqn programming in C using FOAM msha OpenFOAM Running, Solving & CFD 2 January 6, 2008 07:03
Which Solver MSHA msha OpenFOAM Running, Solving & CFD 2 October 15, 2007 11:04
Can the FOAM solve the conjugate heat transfer problem ztdep OpenFOAM Running, Solving & CFD 1 September 15, 2005 14:26


All times are GMT -4. The time now is 06:37.