CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Propellerfanrotating machinery

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 26, 2007, 12:08
Default hello everybody, I'm beginning
  #1
clo
Member
 
clo
Join Date: Mar 2009
Posts: 36
Rep Power: 8
clo is on a distinguished road
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
clo is offline   Reply With Quote

Old   January 30, 2007, 05:30
Default Hi, I'm trying to add turbulen
  #2
clo
Member
 
clo
Join Date: Mar 2009
Posts: 36
Rep Power: 8
clo is on a distinguished road
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
clo is offline   Reply With Quote

Old   January 30, 2007, 06:55
Default for me it sounds like lack of
  #3
Member
 
rafal zietara
Join Date: Mar 2009
Location: Manchester, UK
Posts: 60
Rep Power: 8
rafal is on a distinguished road
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
rafal is offline   Reply With Quote

Old   January 30, 2007, 07:07
Default Hi, A Good day to you!
  #4
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
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
philippose is offline   Reply With Quote

Old   January 30, 2007, 09:03
Default thank you for the hints, but I
  #5
clo
Member
 
clo
Join Date: Mar 2009
Posts: 36
Rep Power: 8
clo is on a distinguished road
thank you for the hints, but I already modified my option file this way....the error is still there!
clo is offline   Reply With Quote

Old   January 30, 2007, 09:20
Default another guess in createFields.
  #6
Member
 
rafal zietara
Join Date: Mar 2009
Location: Manchester, UK
Posts: 60
Rep Power: 8
rafal is on a distinguished road
another guess in createFields.H include this bit:

autoPtr<turbulencemodel> turbulence
(
turbulenceModel::New(U, phi, laminarTransport)
);

hope this help
rafal
rafal is offline   Reply With Quote

Old   January 30, 2007, 09:37
Default thanx rafal but also this isn'
  #7
clo
Member
 
clo
Join Date: Mar 2009
Posts: 36
Rep Power: 8
clo is on a distinguished road
thanx rafal but also this isn't the problem...I think I really have to control one more time the code..
clo is offline   Reply With Quote

Old   January 30, 2007, 13:48
Default Hi again, I am sorry... I did
  #8
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
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
philippose is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


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 03:05
Rotating Machinery : CFX and Fluent Venkatesh.V CFX 6 February 7, 2006 09:41
rotating machinery VIJENDRA CFX 0 July 19, 2004 12:10
Turbo machinery and CFD Barry Main CFD Forum 18 February 27, 2002 00:20


All times are GMT -4. The time now is 00:23.