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

buoyantBoussinesqPimpleFoam for Condensation with a new Boundary condition

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 2, 2012, 08:25
Default buoyantBoussinesqPimpleFoam for Condensation with a new Boundary condition
  #1
New Member
 
Unnikrishnan Mohankumar
Join Date: Apr 2011
Posts: 29
Rep Power: 6
unnikrsn is on a distinguished road
Hi

I am having the same problem. I am working with the buoyantBoussinesqPimpleFoam for Condensation with a new Boundary condition defined within the solver.

I have the problem defining the laminarTransport and Phi in the readTransportProperties.H & createFields.H


When i don't define #include "readTransportProperties.H" in CreateFields.H

createFields.H:96: error: ‘laminarTransport’ was not declared in this scope

When i define #include "readTransportProperties.H" in CreateFields.H

readTransportProperties.H:29: error: ‘phi’ was not declared in this scope


In the Make/options File

EXE_INC = \
-I../buoyantBoussinesqSimpleFoam \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel

EXE_LIBS = \
-lbasicThermophysicalModels \
-lspecie \
-lfiniteVolume \
-lmeshTools \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleTransportModels

Kindly guide me.. If i am making a lot of Mistakes.

Thanks & Regards
Unnikrishnan-
unnikrsn is offline   Reply With Quote

Old   October 2, 2012, 17:12
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Unnikrishnan,

I've moved your post from the thread Bug in turbulentHeatFluxTemperatureFvPatchScalarField; OF 1.6.x to this new thread, because this is a programming question, not a bug related report!

As for your question, I have a few questions of my own, in order to figure out what is going on:
  1. Are you modifying the original source code of the solver "buoyantBoussinesqPimpleFoam" directly at "applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam"?
  2. Or are you modifying a copy of the solver "buoyantBoussinesqPimpleFoam"?
The reason for these questions is simple:
  1. If you're modifying directly in the original source code, then the reason for those errors is because you accidentally erased the line in bold at the file "createFields.H":
    Code:
        Info<< "Reading field U\n" << endl;
        volVectorField U
        (
            IOobject
            (
                "U",
                runTime.timeName(),
                mesh,
                IOobject::MUST_READ,
                IOobject::AUTO_WRITE
            ),
            mesh
        );
    
        #include "createPhi.H"
    
        #include "readTransportProperties.H"
    
        Info<< "Creating turbulence model\n" << endl;
        autoPtr<incompressible::RASModel> turbulence
        (
            incompressible::RASModel::New(U, phi, laminarTransport)
        );
  2. If you're working on a copied folder, then it might be because the sibling folder "buoyantBoussinesqSimpleFoam" is missing. You can check if it exists by running:
    Code:
    ls -l ../buoyantBoussinesqSimpleFoam/
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   October 3, 2012, 01:04
Default
  #3
New Member
 
Unnikrishnan Mohankumar
Join Date: Apr 2011
Posts: 29
Rep Power: 6
unnikrsn is on a distinguished road
Dear Bruno,

Thankyou for the reply.

I had copied the Solver Folder to a new Location..
/home/atmoun/OpenFOAM/atmoun-2.0.1/applications/solvers/buoyantBoussinesqPimpleFoam_Unni

the Original Solver is at the location
/opt/openfoam201/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam

& I checked the createFields.H &

#include "condensationWallFvPatchScalarField.H"
#include "readTransportProperties.H"
#include "createPhi.H"

is all present in the file at the exact same location.

But when i run wmake.. i get the following error..

atmoun@server:~/OpenFOAM/atmoun-2.0.1/applications/solvers/buoyantBoussinesqPimpleFoam_Unni$ wmake
Making dependency list for source file buoyantBoussinesqPimpleFoam_Unni.C
Making dependency list for source file condensationWallFvPatchScalarField.C
SOURCE=buoyantBoussinesqPimpleFoam_Unni.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I../buoyantBoussinesqSimpleFoam_Unni -I/opt/openfoam201/src/finiteVolume/cfdTools -I/opt/openfoam201/src/finiteVolume/lnInclude -I/opt/openfoam201/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam201/src/turbulenceModels -I/opt/openfoam201/src/turbulenceModels/incompressible/RAS/lnInclude -I/opt/openfoam201/src/transportModels -I/opt/openfoam201/src/transportModels/incompressible/singlePhaseTransportModel -IlnInclude -I. -I/opt/openfoam201/src/OpenFOAM/lnInclude -I/opt/openfoam201/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/buoyantBoussinesqPimpleFoam_Unni.o
In file included from createFields.H:93,
from buoyantBoussinesqPimpleFoam_Unni.C:68:
readTransportProperties.H: In function ‘int main(int, char**)’:
readTransportProperties.H:29: error: ‘phi’ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/readTimeControls.H:38: warning: unused variable ‘maxDeltaT’
make: *** [Make/linux64GccDPOpt/buoyantBoussinesqPimpleFoam_Unni.o] Error 1
atmoun@server:~/OpenFOAM/atmoun-2.0.1/applications/solvers/buoyantBoussinesqPimpleFoam_Unni$



About the sibling folder "buoyantBoussinesqSimpleFoam" was missing.
But now i have added the "buoyantBoussinesqSimpleFoam" folder to
/home/atmoun/OpenFOAM/atmoun-2.0.1/applications/solvers/

atmoun@server:~/OpenFOAM/atmoun-2.0.1/applications/solvers/buoyantBoussinesqPimpleFoam_Unni$ wmake
Making dependency list for source file buoyantBoussinesqPimpleFoam_Unni.C
Making dependency list for source file condensationWallFvPatchScalarField.C
SOURCE=buoyantBoussinesqPimpleFoam_Unni.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I../buoyantBoussinesqSimpleFoam -I/opt/openfoam201/src/finiteVolume/cfdTools -I/opt/openfoam201/src/finiteVolume/lnInclude -I/opt/openfoam201/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam201/src/turbulenceModels -I/opt/openfoam201/src/turbulenceModels/incompressible/RAS/lnInclude -I/opt/openfoam201/src/transportModels -I/opt/openfoam201/src/transportModels/incompressible/singlePhaseTransportModel -IlnInclude -I. -I/opt/openfoam201/src/OpenFOAM/lnInclude -I/opt/openfoam201/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/buoyantBoussinesqPimpleFoam_Unni.o
In file included from createFields.H:93,
from buoyantBoussinesqPimpleFoam_Unni.C:68:
readTransportProperties.H: In function ‘int main(int, char**)’:
readTransportProperties.H:29: error: ‘phi’ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/readTimeControls.H:38: warning: unused variable ‘maxDeltaT’
make: *** [Make/linux64GccDPOpt/buoyantBoussinesqPimpleFoam_Unni.o] Error 1
atmoun@server:~/OpenFOAM/atmoun-2.0.1/applications/solvers/buoyantBoussinesqPimpleFoam_Unni$



Could you please help me.. with what this 2 errors are..

readTransportProperties.H: In function ‘int main(int, char**)’:
readTransportProperties.H:29: error: ‘phi’ was not declared in this scope


Thanks & Regards
Unnikrishnan
unnikrsn is offline   Reply With Quote

Old   October 3, 2012, 17:18
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Unnikrishnan,

OK, I've tested just now with an OpenFOAM 2.0.1 installation the following steps:
Code:
mkdir -p $FOAM_RUN
cd $FOAM_RUN

cp -r /opt/openfoam201/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam buoyantBoussinesqPimpleFoam_unni

cp /opt/openfoam201/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H buoyantBoussinesqPimpleFoam_unni/
I then edited the file "Make/files":
Code:
gedit buoyantBoussinesqPimpleFoam_unni/Make/files
And changed the last line to be like this:
Code:
EXE = $(FOAM_USER_APPBIN)/buoyantBoussinesqPimpleFoam_unni
After saving the file, I built the solver like this:
Code:
wmake buoyantBoussinesqPimpleFoam_unni
And it built without any problems!

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   October 5, 2012, 02:59
Unhappy
  #5
New Member
 
Unnikrishnan Mohankumar
Join Date: Apr 2011
Posts: 29
Rep Power: 6
unnikrsn is on a distinguished road
Thankyou Bruno.

You are correct, I made a few mistakes in my new solver. Now it is working fine.

The Mistakes I made was When I copied the readTransportProperties.H from another solver.
I missed to include the line
#include "createPhi.H"

Now there is no problem with the
readTransportProperties.H:29: error: ‘phi’ was not declared in this scope

& in the sibling folder "buoyantBoussinesqSimpleFoam"
I forgot then edited the file "Make/files":
EXE = $(FOAM_USER_APPBIN)/buoyantBoussinesqSimpleFoam_unni

Now that the solver is working.. I am having problem only with the boundary condition.
I will check the Boundary condition for mistake and If i am finding it difficult.

I will come back to the Forum.. But thanks a lot for the help.

Thanks & Regards
Unnikrishnan.
unnikrsn 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
Can anyone give me some hint on how to make traction free boundary condition? poplar OpenFOAM 3 January 14, 2015 03:37
Boundary Conditions Thomas P. Abraham Main CFD Forum 20 July 7, 2013 05:05
Setting outlet Pressure boundary condition using CAFFA code Mukund Pondkule Main CFD Forum 0 March 16, 2011 04:23
Domain Imbalance HMR CFX 3 March 6, 2011 21:10
How to set boundary condition in Fluent for the fo Peiyong FLUENT 1 November 10, 2006 12:44


All times are GMT -4. The time now is 20:06.