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

compliing a new solver with wmake

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2010, 16:21
Default compliing a new solver with wmake
  #1
New Member
 
Join Date: Jul 2010
Posts: 25
Rep Power: 16
kirankarki is on a distinguished road
Hi, i am trying to run a solver modifying the existing one.I modified icoFoam solver and changed into icoScalarTransportFoam and changed all other things as per tutorial(Chalmers) .then i tried to compile the new solver in new icoScalarTransport directory by typing wmake in terminal but couldnt get anything. Here is the error msg:
kiran@kiran-desktop:/opt/openfoam170/applications/icoScalarTransportFoam$ wmake
mkdir: cannot create directory `linuxGccDPOpt': Permission denied
/bin/sh: cannot create linuxGccDPOpt/options: Directory nonexistent
make: *** [linuxGccDPOpt/options] Error 2
/opt/openfoam170/wmake/MakefileFiles:39: linuxGccDPOpt/options: No such file or directory
make: *** No rule to make target `linuxGccDPOpt/options'. Stop.
wmake error: file 'Make/linuxGccDPOpt/objectFiles' could not be created

Any help on this matter will be highly appreciated.
Thanks
kirankarki is offline   Reply With Quote

Old   October 2, 2010, 09:52
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Kirankarki,

In openfoamwiki.net you can find a tutorial named "How to add temperature to icoFoam". In it you will find the following instructions that are crucial for you to follow:
Quote:
Originally Posted by http://openfoamwiki.net/index.php/How_to_add_temperature_to_icoFoam
Code:
cp -r icoFoam $FOAM_USER_APPBIN/../../solvers/my_icoFoam
cd $FOAM_USER_APPBIN/../../solvers/my_icoFoam
(...)
Now go into the Make subdirectory and open the 'files' file with your favorite editor. Change it to read:
Code:
my_icoFoam.C

EXE = $(FOAM_USER_APPBIN)/my_icoFoam
In other words, you have to take into account that your OpenFOAM installation is protected and cannot be overwritten without administrator's powers. But OpenFOAM already takes this into account, by providing a structure for users to have their own set of solvers and utilities, as well as a work folder. The key variables for the user paths are the variables that appear with this command:
Code:
env | grep -e "FOAM_USER_" -e "FOAM_RUN"
This is also explained in OpenFOAM's User Manual, "Compiling applications and libraries", section 3.2.2.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 4, 2010, 18:16
Default compilation
  #3
New Member
 
Join Date: Jul 2010
Posts: 25
Rep Power: 16
kirankarki is on a distinguished road
Thanks wyldckat for ur suggestions,
the code in the link u gave i think is for version1.4.1 which is older one.
i am using the new 1.7.1 version and i tried to follow the steps given in the link but even it doesnot work in the beginning copy stage. Do u have any guides for the new version of openFoam to modify the existing solver ,compile and run it.

Thanks again,

Kiran
kirankarki is offline   Reply With Quote

Old   October 5, 2010, 05:31
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Kiran, the actual C++ code should work with newer versions. Anyways, I updated the wiki page, please let me know if something doesn't work as described.
akidess is offline   Reply With Quote

Old   October 5, 2010, 13:05
Default compilation
  #5
New Member
 
Join Date: Jul 2010
Posts: 25
Rep Power: 16
kirankarki is on a distinguished road
Actually , first i tried to follow the guides as per the http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam to copy icoFoam to the $FOAM_USER_APPBIN but it doesnot work, then i followed the programming tutorial from Chalmers and tried to copy the solver in $WM_PROJECT_USER_DIR/applications and it works. Then i modified all the files as per the tutorial, and finally tried to compile and couldnt succeed, the same error again comes out. I really need help .
Thanks
kirankarki is offline   Reply With Quote

Old   October 5, 2010, 13:23
Default
  #6
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Quote:
Originally Posted by kirankarki View Post
[...]to copy icoFoam to the $FOAM_USER_APPBIN but it doesnot work[...]
WHY not? What was the error message?

Quote:
Originally Posted by kirankarki View Post
[...]Then i modified all the files as per the tutorial, and finally tried to compile and couldnt succeed, the same error again comes out.[...]
WHY not? What was the error message?

Quote:
Originally Posted by kirankarki View Post
I really need help
Then you should make it as easy as possible for people to help you.

Cheers,
Anton
akidess is offline   Reply With Quote

Old   October 5, 2010, 14:08
Default compiling
  #7
New Member
 
Join Date: Jul 2010
Posts: 25
Rep Power: 16
kirankarki is on a distinguished road
Hi guys i have another question as well,
i am also trying to follow the users guide form openfoam.com, where it gives the way to compile one simple solver pisoFoam as an example, it said:

The user can compile pisoFoam by going to the $FOAM_CFD/pisoFoam directory and typing:

wmake
I tried it but it didnt work,i dont know where this CFD comes from, there is no such directory in openfoam directory i installed,
is there any problem in my openfoam or what?

Thanks
kirankarki is offline   Reply With Quote

Old   October 5, 2010, 14:23
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

Anton: great job updating the wiki page!

Kirankarki: "FOAM_CFD" is a typo. I've answered this question before here: http://www.cfd-online.com/Forums/ope...tml#post268664 - post #3

I forgot to file a bug report back then

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 6, 2010, 16:05
Default Visaulization
  #9
New Member
 
Join Date: Jul 2010
Posts: 25
Rep Power: 16
kirankarki is on a distinguished road
Hi Everybody,
Thanks for ur valuable suggestions, through your guidelines, now i can compile the modified solver. But i have another new problem in paraFoam, when i run the case with new solver,the terminal shows everything is ok and the calculations are done for T as well but it didnt show any results in paraView since it doesnot have T in its display button although it has been listed under properties - volume fields button and i checked it.

Any help pls
kirankarki is offline   Reply With Quote

Old   October 7, 2010, 08:42
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Kiran,
Quote:
Originally Posted by kirankarki View Post
But i have another new problem in paraFoam, when i run the case with new solver,the terminal shows everything is ok and the calculations are done for T as well but it didnt show any results in paraView since it doesnot have T in its display button although it has been listed under properties - volume fields button and i checked it.
Some questions come to my mind:
  1. Are you searching for the T value in the first time snapshot? If so, try starting from the last time snapshot.
  2. Have you checked if the T field is really in the time snapshot folder?
  3. Have you run/played the cavity tutorial, to get familiar with the controls in ParaView?
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 7, 2010, 18:17
Default varying temp and material properties
  #11
New Member
 
Join Date: Jul 2010
Posts: 25
Rep Power: 16
kirankarki is on a distinguished road
Hi Guys,
Now i can see the results of the modified solver.Thanks once again .
Now i am trying to modify the geometry into prism like shape that resemble the attic in home so that new solver can be modified to study the heat transfer. I want to input the temperature that varies with every hour just like in a day, but i think now the boundary conditions specify only fixed temp along the sides of geometry.
Also, i am wondering the transport property nu gives the property of flowing fluid , right?But in my case , i need to give the material properties of the wall like thermal conductivity, specific heat , density which can be combined together in energy equation by Tau =k/Rho*C, Where should i put this property in the solver as well as in case folder,

Need help
Thanks
kirankarki is offline   Reply With Quote

Old   October 7, 2010, 18:42
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Kiran,

Well, now this is now officially out of my level of expertise. But I believe that you should look at the cht*MultiRegionFoam solvers and tutorials, because that is probably what you are looking for

Don't know which am I talking about? Then try running these commands:
Code:
find $FOAM_APPBIN -name "cht*MultiRegionFoam"
find $FOAM_TUTORIALS -name "cht*MultiRegionFoam"
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 8, 2010, 13:34
Default chtMultiRegionFoam
  #13
New Member
 
Join Date: Jul 2010
Posts: 25
Rep Power: 16
kirankarki is on a distinguished road
Hey wyldckat,

thanks for suggestion , i go through this foam and it seems it has got too may files in both solvers n case folders that its tough to understand.Do u know anywhere the file structure for solver n case has been described in tutorial. The tutorial given in users guide documentation only describes three simple cases. But this one seems really big solver n case.
Thanks
kirankarki is offline   Reply With Quote

Old   October 12, 2010, 09:26
Default compiling error
  #14
Member
 
mohsen kh
Join Date: Nov 2009
Posts: 41
Rep Power: 16
mohsenkh599 is an unknown quantity at this point
Hi every body,
I have a problem when I want to compile a model.
the error is:

************************************************** *********************
************************************************** *********************

viscoelasticLaws/mohsen/mohsen.C:159: error: no match for ‘operator==’ in ‘Foam:perator+(const Foam::tmp<Foam::fvMatrix<Type> >&, const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = Foam::SymmTensor<double>](((const Foam::tmp<Foam::fvMatrix<Foam::SymmTensor<double> > >&)((const Foam::tmp<Foam::fvMatrix<Foam::SymmTensor<double> > >*)(& Foam::fvm::div(const Foam::surfaceScalarField&, Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SymmTensor<double>](((Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>&)(&((Foam::mohsen*)this)->Foam::mohsen::a_))))))) == Foam:perator+(const Foam::tmp<Foam::GeometricField<TypeR, PatchField, GeoMesh> >&, const Foam::tmp<Foam::GeometricField<Type1, PatchField, GeoMesh> >&) [with Type1 = Foam::Tensor<double>, Type2 = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator*(const Foam::dimensioned<double>&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator&(const Foam::tmp<Foam::GeometricField<TypeR, PatchField, GeoMesh> >&, const Foam::tmp<Foam::GeometricField<Type1, PatchField, GeoMesh> >&) [with Type1 = Foam::SymmTensor<double>, Type2 = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator-(const Foam::dimensioned<Type>&, const Foam::tmp<Foam::GeometricField<Type1, PatchField, GeoMesh> >&) [with Form = Foam::SymmTensor<double>, Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator*(const Foam::scalar&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>&)((const Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>*)(&((Foam::mohsen*)this)->Foam::mohsen::a_))))))))))))))))))))’

************************************************** ************
************************************************** ************

and the model is :

// Velocity gradient tensor
volTensorField L = fvc::grad( U() );

// Convected derivate term
// volTensorField C = tau_ & L;

// vorticity term
volTensorField Vor = L - L.T();

// Twice the rate of deformation tensor
volSymmTensorField twoD = twoSymm( L );


// fc
scalar fc = 0.5; //1 - 27 * det( a_ );

//double dot term

// volSymmTensorField mk = -( (2 / 35) * ( 1 - fc ) * twoD - (2 / 7) * ( a_ & twoD + twoD & a_ + (1 / 2) * tr( twoD & a_ ) * I_ ) - fc * tr( twoD & a_ ) * a_ );

// Stress transport equation
tmp<fvSymmTensorMatrix> aEqn
(
fvm::ddt(a_)
+ fvm::div(phi(), a_)
==
( 1 / 2 ) * ( Vor & a_ - a_ & Vor ) + ( 1 / 2 ) * keisi_ * ( twoD & a_ + a_ & twoD + 2 * ( ( (2 / 35) * ( 1 - fc ) * twoD - (2 / 7) * ( 1 - fc ) * ( a_ & twoD + twoD & a_ + (1 / 2) * tr( twoD & a_ ) * I_ ) - fc * tr( twoD & a_ ) * a_ ) ) + 2 * ci_ * twoD & ( I_ - 3 * a_ )
//+ twoSymm( C )
//- zeta_ / 2 * ( (tau_ & twoD) + (twoD & tau_) )
//- fvm::Sp( epsilon_ / etaP_ * tr(tau_) + 1/lambda_, tau_ )
);

aEqn().relax();
solve(aEqn);
// Viscoelastic stress
tau_ = (etaP_ / keisi_) * (a_ - I_);
}

************************************************** ****************
************************************************** ****************

where "a" , "tau" and "I" are symmetric tensors and "Vor" is asymmetric tensor. and the others are constant parameters.

the Best
mohsenkh599 is offline   Reply With Quote

Old   October 14, 2010, 18:23
Default
  #15
New Member
 
Join Date: Jul 2010
Posts: 25
Rep Power: 16
kirankarki is on a distinguished road
Hi guys,
Greetings, Last time i modified the icoFoam solver to include transport equation with guidance from tutorials and your suggestions. Now, i am trying to include radiation heat transfer into this model. I am not sure whether it works or not but i followed the guidance from another tutorial. I did like this:
1. Include the following lines in my_icoFoam.C
#include "radiationModel.H"
#include "createRadiationModel.H"
2.Copy the hEqn.H from buoyantSimpleRadiationFoam.C into my_icoFoam directory
the equation is like this:
fvScalarMatrix hEqn
( fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p))
- p*fvc::div(phi/fvc::interpolate(rho))
+ radiation->Sh(thermo)
);
3. Modified the Make/options like following:
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
EXE_LIBS = \
-lradiation \
4. Remove the dependencis and run wmake.

Here i got the error, which is like this:
kiran@kiran-desktop:~/OpenFOAM/kiran-1.7.0/openfoam170/applications/solvers/heatTransfer/AtticFoam$ wmake
options:6: warning: backslash-newline at end of file
linuxGccDPOpt/options:10: *** missing separator. Stop.
wmake error: file 'Make/linuxGccDPOpt/objectFiles' could not be created

Please somebody tell me where i made the mistake.
If i can solve this compilation error, then i can go forward to modify the tutorial case to suit it.

Thanks
kirankarki is offline   Reply With Quote

Old   October 14, 2010, 19:02
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

Let me start with Kiran:
Quote:
Originally Posted by kirankarki View Post
3. Modified the Make/options like following:
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
EXE_LIBS = \
-lradiation \

(...)

options:6: warning: backslash-newline at end of file
linuxGccDPOpt/options:10: *** missing separator. Stop.
The backlash is the character "\", which tells the code parser that the line of code continues in the next line, so the human user is able to read that piece of code without the need to scroll to the right. It's meant to be used as the last character of that line, as if it were a line break... Therefore, the correct code for your options file should be:
Code:
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude

EXE_LIBS = \
-lradiation
Now as for Mohsen: sorry for the late reply, but when you guys post code without using the forum's "#" button for marking text that is code (visible in the forum's text editor toolbar in advanced mode), it becomes seriously hard to read the code
Anyway, it seems that you used one equal sign too many in the line 159, namely:
Code:
// Stress transport equation
    tmp<fvSymmTensorMatrix> aEqn
    (
        fvm::ddt(a_)
      + fvm::div(phi(), a_)
        ==
        ( 1 / 2 ) * ( Vor & a_ - a_ & Vor ) ...
There should only be one sign, I suppose At least is what the error message is insinuating:
Code:
viscoelasticLaws/mohsen/mohsen.C:159: error: no match for ‘operator==’ in
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 17, 2010, 09:15
Default Hi
  #17
Member
 
mohsen kh
Join Date: Nov 2009
Posts: 41
Rep Power: 16
mohsenkh599 is an unknown quantity at this point
Hello
I want to employ a solver for composite materials into the viscoelasticfluidFoam but while compiling there are errors which I cannot understand completely.
the set of equations and the code I have developed are attached.

the other parameters are constants.
the Best
Attached Images
File Type: jpg 2.jpg (83.8 KB, 26 views)
Attached Files
File Type: zip ali.zip (6.7 KB, 2 views)
mohsenkh599 is offline   Reply With Quote

Old   October 26, 2010, 16:14
Default
  #18
New Member
 
Join Date: Jul 2010
Posts: 25
Rep Power: 16
kirankarki is on a distinguished road
Hi Wyldckat,

Thanks for your help, i did changes you mentioned in the Make/options directory and then i tried to compile it, but got errors which is given below

kiran@kiran-desktop:~/OpenFOAM/kiran-1.7.0/openfoam170/applications/solvers/heatTransfer/AtticFoam$ wmake
linuxGccDPOpt/options:7: *** missing separator. Stop.
wmake error: file 'Make/linuxGccDPOpt/objectFiles' could not be created

Any help please
kirankarki is offline   Reply With Quote

Old   October 26, 2010, 18:59
Default
  #19
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Kiran,

Without looking at the file, I can't deduce what's wrong
Perhaps you removed one too many backslashes "\"?

Best regards,
Bruno
__________________
wyldckat 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
Patches for OpenFOAM 1.7 on MacOS X gschaider OpenFOAM Installation 101 September 21, 2011 06:37
Problems Installing OF 1.6 32 bit bucksfan OpenFOAM Installation 19 August 4, 2009 02:36
OpenFOAM15 installables are incomplete problem with paraFoam tryingof OpenFOAM Bugs 17 December 7, 2008 05:41
Problem of compilation OF 14Allwmake command not found erik_d OpenFOAM Bugs 13 September 13, 2008 22:45
[OpenFOAM] ParaFoam error message joey ParaView 1 October 2, 2006 14:28


All times are GMT -4. The time now is 22:21.