CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   add heat equation to interFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/148686-add-heat-equation-interfoam.html)

masoudpaktinat February 17, 2015 12:00

add heat equation to interFoam
 
hello dear friends
this is part of my code and when i run wmake to compile it , I encounter following error


Info<<"Readeng field T/n"<<endl;
volScalarField T
(
IOobject
(
"T"
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);


error: expected primary-expression before ‘(’ token
(



error: expected ‘)’ before ‘runTime’
runTime.timeName(),
^
i will be so thankful if u know what should i do & help me ?

alexeym February 17, 2015 12:17

Comma after "T"?

masoudpaktinat February 17, 2015 17:32

Quote:

Originally Posted by alexeym (Post 532180)
Comma after "T"?

Oh thanks so much i can't believe this was the problem ;
maybe it's because of my poor knowledg of c++

know i have a new stuation when run wmake

Make/linux64GccDPOpt/myinterFoamDiabatic.o: In function `main':
myinterFoamDiabatic.C:(.text.startup+0x40c7): undefined reference to `Foam::incompressibleTwoPhaseMixture::kappaf() const'
collect2: error: ld returned 1 exit status
make: *** [/home/masoud/OpenFOAM/masoud-2.3.1/platforms/linux64GccDPOpt/bin/myinterFoamDiabatic] Error 1

??

I would be so glad if you can introduce to me some book or tutorial in advance openFoam & programing .
i couldn't find any in it's website .

Andrew_Sm February 18, 2015 04:40

Quote:

Originally Posted by masoudpaktinat (Post 532237)
Oh thanks so much i can't believe this was the problem ;
maybe it's because of my poor knowledg of c++

know i have a new stuation when run wmake

Make/linux64GccDPOpt/myinterFoamDiabatic.o: In function `main':
myinterFoamDiabatic.C:(.text.startup+0x40c7): undefined reference to `Foam::incompressibleTwoPhaseMixture::kappaf() const'
collect2: error: ld returned 1 exit status
make: *** [/home/masoud/OpenFOAM/masoud-2.3.1/platforms/linux64GccDPOpt/bin/myinterFoamDiabatic] Error 1

??

I would be so glad if you can introduce to me some book or tutorial in advance openFoam & programing .
i couldn't find any in it's website .

My friend I am afraid there is no such information available. Any detailed information about OpenFOAM comes under NDA (refer https://en.wikipedia.org/wiki/Non-disclosure_agreement).

Check this
http://www.cfd-online.com/Forums/ope...-velocity.html

BenjAkker February 19, 2015 07:24

Quote:

Originally Posted by Andrew_Sm (Post 532283)
My friend I am afraid there is no such information available. Any detailed information about OpenFOAM comes under NDA (refer https://en.wikipedia.org/wiki/Non-disclosure_agreement).

Check this
http://www.cfd-online.com/Forums/ope...-velocity.html

It seems that you misunderstood the conversation to which you linked. In no way does it imply anything of the sort.

In response to the original question: the official documentation provides much useful information regarding programming and code conventions, but I'm afraid it does require prior knowledge of and experience with C++.


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