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

Embed explicitSetValue in chtMultiRegionFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 12, 2012, 04:29
Default Embed explicitSetValue in chtMultiRegionFoam
  #1
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Dear all,

I am trying to embed the explicitSetValue feature (see here) in the chtMultiRegionFoam solver.

I succeded in doing this for the buoyantSimpleFoam solver (attached you can find the file), but I am finding it very difficult to do the same for the unsteady solvers (both buoyantPimpleFoam and chtMultiRegionFoam).

Now I am working on the latter (i.e. chtMultiRegionFoam) and I am asking for help.

Could anyone give me any hints?

Thanks a lot,

Samuele

PS: when I try to compile my new solver chtMultiRegionFoam_Epta I got this error message:
Code:
lab@lab-laptop:~/OpenFOAM/lab-2.1.0/applications/solvers/chtMultiRegionFoam_Epta$ wmake
Making dependency list for source file fluid/compressibleCourantNo.C
Making dependency list for source file solid/solidRegionDiffNo.C
Making dependency list for source file chtMultiRegionFoam_Epta.C
SOURCE=fluid/compressibleCourantNo.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -Ifluid -Isolid -Iinclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/turbulenceModels -I/opt/openfoam210/src/turbulenceModels/compressible/RAS/lnInclude -I/opt/openfoam210/src/finiteVolume/cfdTools -I/opt/openfoam210/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam210/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam210/src/thermophysicalModels/basicSolidThermo/lnInclude -I/opt/openfoam210/src/turbulenceModels/compressible/turbulenceModel/lnInclude -I/opt/openfoam210/src/thermophysicalModels/radiationModels/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/compressibleCourantNo.o
SOURCE=solid/solidRegionDiffNo.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -Ifluid -Isolid -Iinclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/turbulenceModels -I/opt/openfoam210/src/turbulenceModels/compressible/RAS/lnInclude -I/opt/openfoam210/src/finiteVolume/cfdTools -I/opt/openfoam210/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam210/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam210/src/thermophysicalModels/basicSolidThermo/lnInclude -I/opt/openfoam210/src/turbulenceModels/compressible/turbulenceModel/lnInclude -I/opt/openfoam210/src/thermophysicalModels/radiationModels/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/solidRegionDiffNo.o
SOURCE=chtMultiRegionFoam_Epta.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -Ifluid -Isolid -Iinclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/turbulenceModels -I/opt/openfoam210/src/turbulenceModels/compressible/RAS/lnInclude -I/opt/openfoam210/src/finiteVolume/cfdTools -I/opt/openfoam210/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam210/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam210/src/thermophysicalModels/basicSolidThermo/lnInclude -I/opt/openfoam210/src/turbulenceModels/compressible/turbulenceModel/lnInclude -I/opt/openfoam210/src/thermophysicalModels/radiationModels/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/chtMultiRegionFoam_Epta.o
In file included from chtMultiRegionFoam_Epta.C:56:
fluid/createFluidFields.H: In function ‘int main(int, char**)’:
fluid/createFluidFields.H:201: error: no matching function for call to ‘Foam::IObasicSourceList::IObasicSourceList(Foam::PtrList<Foam::fvMesh>&)’
/opt/openfoam210/src/finiteVolume/lnInclude/IObasicSourceList.H:75: note: candidates are: Foam::IObasicSourceList::IObasicSourceList(const Foam::fvMesh&)
/opt/openfoam210/src/finiteVolume/lnInclude/IObasicSourceList.H:64: note:                 Foam::IObasicSourceList::IObasicSourceList(const Foam::IObasicSourceList&)
In file included from chtMultiRegionFoam_Epta.C:66:
solid/setRegionSolidFields.H:1: warning: unused variable ‘mesh’
solid/setRegionSolidFields.H:15: warning: unused variable ‘T’
In file included from chtMultiRegionFoam_Epta.C:78:
solid/setRegionSolidFields.H:1: warning: unused variable ‘mesh’
solid/setRegionSolidFields.H:15: warning: unused variable ‘T’
fluid/setRegionFluidFields.H:1: warning: unused variable ‘mesh’
fluid/setRegionFluidFields.H:5: warning: unused variable ‘kappa’
fluid/setRegionFluidFields.H:6: warning: unused variable ‘U’
fluid/setRegionFluidFields.H:7: warning: unused variable ‘phi’
fluid/setRegionFluidFields.H:9: warning: unused variable ‘turb’
fluid/setRegionFluidFields.H:10: warning: unused variable ‘K’
fluid/setRegionFluidFields.H:11: warning: unused variable ‘dpdt’
fluid/setRegionFluidFields.H:13: warning: unused variable ‘p’
fluid/setRegionFluidFields.H:14: warning: unused variable ‘psi’
fluid/setRegionFluidFields.H:15: warning: unused variable ‘h’
fluid/setRegionFluidFields.H:18: warning: unused variable ‘gh’
fluid/setRegionFluidFields.H:19: warning: unused variable ‘ghf’
fluid/setRegionFluidFields.H:21: warning: unused variable ‘rad’
make: *** [Make/linux64GccDPOpt/chtMultiRegionFoam_Epta.o] Error 1
lab@lab-laptop:~/OpenFOAM/lab-2.1.0/applications/solvers/chtMultiRegionFoam_Epta$
Attached Files
File Type: gz chtMultiRegionFoam_Epta.tar.gz (18.3 KB, 6 views)
File Type: gz buoyantSimpleFoam_Epta.tar.gz (2.8 KB, 2 views)
samiam1000 is offline   Reply With Quote

Old   April 17, 2012, 09:49
Default
  #2
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 195
Rep Power: 10
kwardle is on a distinguished road
Not sure how much I can help. Looks to be complaining about the way you have called:

Code:
IObasicSourceList sources(fluidRegions);
in createFluidFields.H and does not seem to take a pointer list as an argument. It appears the only candidate argument is a single mesh instance. Perhaps you need to call this within the loop for the individual mesh regions? Not sure what will happen if this is called multiple times. You might take a look at IObasicSourceList.H and see if you can figure out how it will behave in that case.
kwardle is offline   Reply With Quote

Old   April 18, 2012, 05:14
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Dear Kent,

thanks for help.

Actually, if I do as you suggested, I get this:
Code:
lab@lab-laptop:~/OpenFOAM/lab-2.1.0/applications/solvers/chtMultiRegionFoam_Epta$ wmake
Making dependency list for source file fluid/compressibleCourantNo.C
Making dependency list for source file solid/solidRegionDiffNo.C
Making dependency list for source file chtMultiRegionFoam_Epta.C
SOURCE=fluid/compressibleCourantNo.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -Ifluid -Isolid -Iinclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/turbulenceModels -I/opt/openfoam210/src/turbulenceModels/compressible/RAS/lnInclude -I/opt/openfoam210/src/finiteVolume/cfdTools -I/opt/openfoam210/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam210/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam210/src/thermophysicalModels/basicSolidThermo/lnInclude -I/opt/openfoam210/src/turbulenceModels/compressible/turbulenceModel/lnInclude -I/opt/openfoam210/src/thermophysicalModels/radiationModels/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/compressibleCourantNo.o
SOURCE=solid/solidRegionDiffNo.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -Ifluid -Isolid -Iinclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/turbulenceModels -I/opt/openfoam210/src/turbulenceModels/compressible/RAS/lnInclude -I/opt/openfoam210/src/finiteVolume/cfdTools -I/opt/openfoam210/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam210/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam210/src/thermophysicalModels/basicSolidThermo/lnInclude -I/opt/openfoam210/src/turbulenceModels/compressible/turbulenceModel/lnInclude -I/opt/openfoam210/src/thermophysicalModels/radiationModels/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/solidRegionDiffNo.o
SOURCE=chtMultiRegionFoam_Epta.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -Ifluid -Isolid -Iinclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/turbulenceModels -I/opt/openfoam210/src/turbulenceModels/compressible/RAS/lnInclude -I/opt/openfoam210/src/finiteVolume/cfdTools -I/opt/openfoam210/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam210/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam210/src/thermophysicalModels/basicSolidThermo/lnInclude -I/opt/openfoam210/src/turbulenceModels/compressible/turbulenceModel/lnInclude -I/opt/openfoam210/src/thermophysicalModels/radiationModels/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/chtMultiRegionFoam_Epta.o
In file included from chtMultiRegionFoam_Epta.C:66:
solid/setRegionSolidFields.H: In function ‘int main(int, char**)’:
solid/setRegionSolidFields.H:1: warning: unused variable ‘mesh’
solid/setRegionSolidFields.H:15: warning: unused variable ‘T’
In file included from chtMultiRegionFoam_Epta.C:78:
solid/setRegionSolidFields.H:1: warning: unused variable ‘mesh’
solid/setRegionSolidFields.H:15: warning: unused variable ‘T’
fluid/setRegionFluidFields.H:1: warning: unused variable ‘mesh’
fluid/setRegionFluidFields.H:5: warning: unused variable ‘kappa’
fluid/setRegionFluidFields.H:6: warning: unused variable ‘U’
fluid/setRegionFluidFields.H:7: warning: unused variable ‘phi’
fluid/setRegionFluidFields.H:9: warning: unused variable ‘turb’
fluid/setRegionFluidFields.H:10: warning: unused variable ‘K’
fluid/setRegionFluidFields.H:11: warning: unused variable ‘dpdt’
fluid/setRegionFluidFields.H:13: warning: unused variable ‘p’
fluid/setRegionFluidFields.H:14: warning: unused variable ‘psi’
fluid/setRegionFluidFields.H:15: warning: unused variable ‘h’
fluid/setRegionFluidFields.H:18: warning: unused variable ‘gh’
fluid/setRegionFluidFields.H:19: warning: unused variable ‘ghf’
fluid/setRegionFluidFields.H:21: warning: unused variable ‘rad’
In file included from fluid/solveFluid.H:11,
                 from chtMultiRegionFoam_Epta.C:106:
fluid/UEqn.H:8: error: ‘sources’ was not declared in this scope
make: *** [Make/linux64GccDPOpt/chtMultiRegionFoam_Epta.o] Error 1
That's very strange, since the sources is defined in the createFluidFields.H file.

Any other idea?
samiam1000 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
Error in chtMultiRegionFoam kirankarki OpenFOAM 5 October 24, 2012 17:20
Using a Different Thermodynamics Package with the chtMultiRegionFoam Solver m.nichols19 OpenFOAM 7 March 17, 2011 17:26
chtmultiregionFoam alvora OpenFOAM 9 February 23, 2011 04:06
chtMultiRegionFoam......Help please.... devesh.baghel OpenFOAM 8 April 7, 2010 15:17
How to add 3rd region to chtMultiRegionFoam benk OpenFOAM 1 April 3, 2010 17:22


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