|
[Sponsors] |
January 26, 2007, 12:08 |
hello everybody, I'm beginning
|
#1 |
Member
clo
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
hello everybody, I'm beginning to work with OF to simulate a propeller. For the moment I'm trying to modify the 3Dmixer case and make it work with icoDynFoam. I added inlet and outlet patches and now the case run even if results aren't too much realistic (I'm at the beginning, after all!). I saw in the forum that a few guys are discussing about it...what if we share ideas all together? Basically the idea is to add to mixer3D step by step inlet&outlet,turbulence,and two-phase (and then adding complexity in geometry). Is there someone interested about the subject?
ciao clo |
|
January 30, 2007, 05:30 |
Hi, I'm trying to add turbulen
|
#2 |
Member
clo
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
Hi, I'm trying to add turbulence in icoDynFoam generating a new solver called TurboFoam.
here is my TurboFoam.c #include "fvCFD.H" #include "dynamicFvMesh.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" #include "incompressible/turbulenceModel/turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { # include "setRootCase.H" # include "createTime.H" # include "createDynamicFvMesh.H" # include "readPISOControls.H" # include "initContinuityErrs.H" # include "createFields.H" # include "readTimeControls.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { # include "readPISOControls.H" # include "readTimeControls.H" # include "CourantNo.H" if (mesh.moving()) { // Make the fluxes absolute phi += fvc::meshPhi(U); } # include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; bool meshChanged = mesh.update(); if (mesh.moving() || meshChanged) { # include "correctPhi.H" } if (mesh.moving()) { // Make the fluxes relative phi -= fvc::meshPhi(U); } # include "UEqn.H" // --- PISO loop for (int corr=0; corr<nCorr; corr++) { rUA = 1.0/UEqn.A(); U = rUA*UEqn.H(); phi = (fvc::interpolate(U) & mesh.Sf()); //+ fvc::ddtPhiCorr(rUA, U, phi); adjustPhi(phi, U, p); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix pEqn ( fvm::laplacian(rUA, p) == fvc::div(phi) ); pEqn.setReference(pRefCell, pRefValue); pEqn.solve(); if (nonOrth == nNonOrthCorr) { phi -= pEqn.flux(); } } # include "continuityErrs.H" if (mesh.moving()) { // Make the fluxes relative phi -= fvc::meshPhi(U); } 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); } and my UEqn.H fvVectorMatrix UEqn ( fvm::div(phi, U) + turbulence->divR(U) ); if (momentumPredictor) { solve(UEqn == -fvc::grad(p)); } when I run wmake this is the output UEqn.H:4: error: 'turbulence' was not declared in this scope I can't understand what's wrong and what this error is about... any ideas? thanx ciao |
|
January 30, 2007, 06:55 |
for me it sounds like lack of
|
#3 |
Member
rafal zietara
Join Date: Mar 2009
Location: Manchester, UK
Posts: 60
Rep Power: 17 |
for me it sounds like lack of (in file Make/option)
-I$(LIB_SRC)/turbulenceModels in EXE_INC and/or -lincompressibleTurbulenceModels in EXE_LIBS but it is a wild guess good luck rafal compare it with : ~/OpenFOAM/OpenFOAM-1.3/applications/solvers/ incompressible/turbFoam/Make/option |
|
January 30, 2007, 07:07 |
Hi,
A Good day to you!
|
#4 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hi,
A Good day to you! For the solver you are trying to put together, the "options" file in the "Make" folder should be as follows: EXE_INC = \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/transportModels EXE_LIBS = \ -ldynamicFvMesh \ -ldynamicMesh \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools This will bring in the turbulence models which you need to incorporate turbulence into the solver. Have a nice day! Philippose |
|
January 30, 2007, 09:03 |
thank you for the hints, but I
|
#5 |
Member
clo
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
thank you for the hints, but I already modified my option file this way....the error is still there!
|
|
January 30, 2007, 09:20 |
another guess in createFields.
|
#6 |
Member
rafal zietara
Join Date: Mar 2009
Location: Manchester, UK
Posts: 60
Rep Power: 17 |
another guess in createFields.H include this bit:
autoPtr<turbulencemodel> turbulence ( turbulenceModel::New(U, phi, laminarTransport) ); hope this help rafal |
|
January 30, 2007, 09:37 |
thanx rafal but also this isn'
|
#7 |
Member
clo
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
thanx rafal but also this isn't the problem...I think I really have to control one more time the code..
|
|
January 30, 2007, 13:48 |
Hi again,
I am sorry... I did
|
#8 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hi again,
I am sorry... I didnt look at the error message you were getting. Try this.... Just before the line #include "UEqn.H" put in a "{", and put in a closing "}" just before the line turbulence->correct(); If that doest work, pull the code in the "UEqn.H" include file directly into the main code of the solver, and again put in the "{" and the "}" in the same locations as above. Let me know if it works :-)! By the way... if I am not mistaken, shouldnt the "UEqn" be: fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + turbulence->divR(U) ); if (momentumPredictor) { solve(UEqn == -fvc::grad(p)); } I just happened to notice it... you need the time differential of "U" in the equation too. Philippose |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Turbo machinery | Subhasis Chanda | Main CFD Forum | 0 | February 3, 2009 06:42 |
grid generator for turbo machinery. | Stelios | Main CFD Forum | 4 | June 20, 2007 04:05 |
Rotating Machinery : CFX and Fluent | Venkatesh.V | CFX | 6 | February 7, 2006 09:41 |
rotating machinery | VIJENDRA | CFX | 0 | July 19, 2004 13:10 |
Turbo machinery and CFD | Barry | Main CFD Forum | 18 | February 27, 2002 00:20 |