CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

A question on implementing the actuationDisk to the pisoFoam solver

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 21, 2013, 14:58
Default A question on implementing the actuationDisk to the pisoFoam solver
  #1
New Member
 
Frank Yu
Join Date: Jun 2011
Location: Toronto, ON
Posts: 15
Rep Power: 6
frankyux is on a distinguished road
Hi folks,
I have a question on implementing the actuationDisk to the pisoFoam solver. Since I didn’t use OpenFoam too much and don’t familiar with C++, my questions may sounds stupid.
I’m currently using OpenFoam 2.0.1, I can find the implementation of actuationDisk under simpleFoam, namely windSimpleFoam, and this is my starting point.

My first attempt was, in the pisoFoam.C, first include #include "IObasicSourceList.H". Then add the actuationDisk to the right-hand-side of the UEqn.
Code:
#include "fvCFD.H"#include "singlePhaseTransportModel.H"#include "turbulenceModel.H"#include "IObasicSourceList.H"int main(int argc, char *argv[]){ #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" #include "createFields.H" #include "initContinuityErrs.H" IObasicSourceList actuationDisks(mesh); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; #include "readPISOControls.H" #include "CourantNo.H" // Pressure-velocity PISO corrector { // Momentum predictor fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U) ); // Add resistance on the actuation disks actuationDisks.addSu(UEqn()); UEqn.relax(); if (momentumPredictor) { solve(UEqn == -fvc::grad(p)); } // --- PISO loop …. …. } turbulence->correct(); runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } //Info<< "End\n" << endl;


After the above modification, I got the following error message:

pisoFoam.C: In function ‘int main(int, char**)’:

pisoFoam.C:77: error: no match for call to ‘(Foam::fvVectorMatrix) ()’

where my Line77 refers to actuationDisks.addSu(UEqn());Does this mean that there is something wrong with the format of my UEqn?

I also tried to write my UEqn separately as UEqn.H, and replace the one in psioFoam,
Code:
tmp<fvVectorMatrix> UEqn ( fvm::div(phi, U) + turbulence->divDevReff(U) ); // Add resistance on the actuation disksactuationDisks.addSu(UEqn());
However, I got the following error message:

In file included from pisoFoam.C:81:
UEqn.H: In function ‘int main(int, char**)’:
UEqn.H:13: error: ‘class Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >’ has no member named ‘relax’
pisoFoam.C:97: error: ‘class Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >’ has no member named ‘A’
pisoFoam.C:99: error: ‘class Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >’ has no member named ‘H’


This one I think is because in piso loop it needs UEqn.A() and UEqn.H().
For now I just want to create a very simple example that I can involve actuationDisk in piso algorithm, anyone had this experience or any thoughts?

Thanks in advance.

Regards
Frank
frankyux 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
different results between serial solver and parallel solver wlt_1985 FLUENT 10 April 11, 2012 15:25
pFinal for pisoFoam solver L1011 OpenFOAM 3 March 16, 2011 12:59
Question abt. the Riemann analytic solver jinwon Main CFD Forum 0 July 16, 2007 14:11
question about implementing boundary conditions saygin Main CFD Forum 0 July 6, 2006 07:08
Poisson Solver question Suresh Main CFD Forum 3 August 12, 2005 04:37


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