CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   cuttingPlane + timeVaryingMappedFixedValue - channel flow (

KYPCK444 August 7, 2013 06:26

cuttingPlane + timeVaryingMappedFixedValue - channel flow

I am working with channel flow case.
I want to set as inlet conditions fields data obtained from a previous channel flow simulation, which has been left reaching fully developed features.

Referring to and I am trying to apply the cuttingPlane method to the "previous-channel-flow", but I am new to openFoam and I'm not able to correctly edit the solver (I'm using channelFoam solver) in order to create a set of field files to be used (using timeVaryingMappedFixedValue patch such as in pitzDailyExptInlet tutorial) as inlet conditions for the "second-channel-flow".

I tried to edit channelFoam solver this way:

#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "LESModel.H"
#include "IFstream.H"
#include "OFstream.H"
#include "Random.H"

// * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readTransportProperties.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "createGradP.H"

point pnt(3,0,0);
vector direction(1,0,0);
plane pl1(pnt,direction);
cuttingPlane cutPlane(mesh,pl1);
const labelList& cutCells = cutPlane.cells();
cellSet someCells(mesh,"someCells",cutCells);

(in bold the lines I added, taken from the aforementioned topics).

Trying to compile the new solver with wmake, I obtain what follows:

channelFoam_cuttingPlane.C:54:1: error: ‘plane’ was not declared in this scope
channelFoam_cuttingPlane.C:54:7: error: expected ‘;’ before ‘pl1’
channelFoam_cuttingPlane.C:55:1: error: ‘cuttingPlane’ was not declared in this scope
channelFoam_cuttingPlane.C:55:14: error: expected ‘;’ before ‘cutPlane’
channelFoam_cuttingPlane.C:56:29: error: ‘cutPlane’ was not declared in this scope
channelFoam_cuttingPlane.C:57:1: error: ‘cellSet’ was not declared in this scope
channelFoam_cuttingPlane.C:57:9: error: expected ‘;’ before ‘someCells’
channelFoam_cuttingPlane.C:58:1: error: ‘someCells’ was not declared in this scope
/opt/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’
/opt/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’
channelFoam_cuttingPlane.C:56:18: warning: unused variable ‘cutCells’
make: *** [Make/linux64GccDPOpt/channelFoam_cuttingPlane.o] Error 1

Does anyone know what and where I am failing?

I would also like to know if it is possible, once the data from the cuttingSurface have been taken, to map them as inlet conditions to the second channel if this one is discretized with a finer mesh.

I hope it's not a problem if I opened a new thread about the topic, because the reference ones are very old and inactive, I guess.

(I apologize if my questions are silly ^^)

Thank you very much in advance.

All times are GMT -4. The time now is 04:11.