Error compiling pisoFOAM
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; } |
Greetings Eric and welcome to the forum!
Quote:
How exactly are you activating your shell environment? I'm talking about the following installation step: Quote:
Best regards, Bruno |
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? |
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 |
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 |
Hi Sandy,
Quote:
Code:
#include "../interFoam/correctPhi.H" Code:
#include "correctPhi.H" Code:
cp $FOAM_APP/solvers/multiphase/interFoam/correctPhi.H . Bruno |
:eek::confused::D That's better, Bruno! .... I will finish them following you .... Thanks
|
All times are GMT -4. The time now is 10:20. |