|
[Sponsors] |
January 23, 2012, 16:01 |
Error compiling pisoFOAM
|
#1 |
New Member
Eric
Join Date: Jan 2012
Posts: 18
Rep Power: 14 |
I have edited the pisoFOAM solver to allow for an adaptive time-step but when I try to compile the solver i get an error that states:
wmake error: environment variable $WM_OPTIONS not set I have searched through countless forums and have not found a solution to this problem. If you have any ideas why this is occurring please enlighten me. This is my pisoFOAM.C file: #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" #include "createFields.H" #include "initContinuityErrs.H" #include "CourantNo.H" #include "readTimeControls.H" #include "setInitialDeltaT.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; for (runTime++; !runTime.end(); runTime++) { Info<< "Time = " << runTime.timeName() << nl << endl; #include "readTimeControls.H" #include "readPISOControls.H" #include "CourantNo.H" #include "setDeltaT.H" // Pressure-velocity PISO corrector { // Momentum predictor fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U) ); UEqn.relax(); if (momentumPredictor) { solve(UEqn == -fvc::grad(p)); } // --- PISO loop for (int corr=0; corr<nCorr; corr++) { volScalarField rUA = 1.0/UEqn.A(); U = rUA*UEqn.H(); phi = (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, U, phi); adjustPhi(phi, U, p); // Non-orthogonal pressure corrector loop for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { // Pressure corrector fvScalarMatrix pEqn ( fvm::laplacian(rUA, p) == fvc::div(phi) ); pEqn.setReference(pRefCell, pRefValue); if ( corr == nCorr-1 && nonOrth == nNonOrthCorr ) { pEqn.solve(mesh.solver("pFinal")); } else { pEqn.solve(); } if (nonOrth == nNonOrthCorr) { phi -= pEqn.flux(); } } #include "continuityErrs.H" U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); } } turbulence->correct(); runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; return 0; } |
|
January 23, 2012, 16:24 |
|
#2 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Eric and welcome to the forum!
The error message seems self-explanatory... it seems that your shell environment isn't fully operational. How exactly are you activating your shell environment? I'm talking about the following installation step: Quote:
Best regards, Bruno
__________________
|
||
January 23, 2012, 16:39 |
|
#3 |
New Member
Eric
Join Date: Jan 2012
Posts: 18
Rep Power: 14 |
Thanks for responding!
I'm afraid I am a somewhat new user to OpenFOAM so my background knowledge may be limited. I am not sure what you mean by the shell environment but the line that you described from the bashrc file exists already except that it is in the opt directory not home. Something I have noticed is that after I made changes to the pisoFOAM.C file I ran wclean and the Make folder dissapeared within the pisoFOAM directory. Do I need to remake that folder or is the wmake command supposed to create this for me? |
|
January 23, 2012, 16:47 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Eric,
Then I suggest that you practice a bit more before going into the real deal. Here is a good tutorial: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam Pay good attention to the detail "FOAM_USER_APPBIN". As for "shell environment", see the first paragraphs of Advanced tips for working with the OpenFOAM shell environment Best regards, Bruno
__________________
|
|
January 23, 2012, 23:10 |
|
#5 |
Senior Member
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18 |
Hi Bruno,
Could you tell me how to compile a new solver in OpenFoam-2.1.0? I did them step by step following in http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam , however, I got error informations as follows: MyinterFoam.C:65:41: fatal error: ../interFoam/correctPhi.H: No such file or directory compilation terminated. make: *** [Make/linuxGccDPOpt/MyinterFoam.o] Error 1 Please help me out. Thanks Sandy |
|
January 25, 2012, 19:18 |
|
#6 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sandy,
Quote:
Code:
#include "../interFoam/correctPhi.H" Code:
#include "correctPhi.H" Code:
cp $FOAM_APP/solvers/multiphase/interFoam/correctPhi.H . Bruno
__________________
|
||
January 25, 2012, 20:00 |
|
#7 |
Senior Member
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18 |
That's better, Bruno! .... I will finish them following you .... Thanks
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Differences in solution method for pisoFoam and buoyantBoussinesqPisoFoam | mchurchf | OpenFOAM | 7 | August 6, 2023 10:12 |
pisoFoam : error floating point | Dbutant | OpenFOAM Running, Solving & CFD | 10 | October 9, 2012 10:45 |
pisoFoam compiling error with OF 1.7.1 on MAC OSX | Greg Givogue | OpenFOAM Programming & Development | 3 | March 4, 2011 18:18 |
Trouble migrating oodles to pisoFoam while changing from OF 1.5 to 1.7 | sebi | OpenFOAM | 0 | December 7, 2010 10:00 |
Buoundary Condition for PisoFoam | vishal | OpenFOAM | 4 | October 21, 2010 10:17 |