CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   yPlusRAS + chtMultiRegionFoam (https://www.cfd-online.com/Forums/openfoam-solving/62944-yplusras-chtmultiregionfoam.html)

mabinty March 24, 2009 07:35

yPlusRAS + chtMultiRegionFoam
 
Dear all!!

Since a while I ve tried to modify the yPlusRAS utility for a multi region case but haven t succeeded yet. The code compiles but when executed I get the following error message:

Time = 0.001
Reading field p

Reading thermophysical properties

Selecting thermodynamics package hThermo>>>>

Not Implemented
Trying to construct an genericFvPatchField on patch air_to_ceiling of
field h#0 Foam::error::printStack(Foam:http://www.cfd-online.com/Forums/../...part/proud.gifstream&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::genericFvPatchField::genericFvPatchField(Foa m::fvPatch
const&, Foam::DimensionedField const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libfiniteVolume.so"
#3 Foam::fvPatchField::addpatchConstructorToTable >::New(Foam::fvPatch
const&, Foam::DimensionedField const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libfiniteVolume.so"
#4 Foam::fvPatchField::New(Foam::word const&, Foam::fvPatch const&,
Foam::DimensionedField const&) at
~/OpenFOAM/OpenFOAM-1.5.x/src/finiteVolume/lnInclude/newFvPatchField.C:70
#5
Foam::GeometricField::GeometricBoundaryField::Geom etricBoundaryField(Fo am::fvBoundaryMesh const&, Foam::DimensionedField const&, Foam::List const&) in "/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libbasicThermophysicalMode ls.so"
#6 Foam::GeometricField::GeometricField(Foam::IOobjec t const&,
Foam::fvMesh const&, Foam::dimensionSet const&, Foam::List const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libbasicThermophysicalMode ls.so"
#7 Foam::hThermo > > > >::hThermo(Foam::fvMesh const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libbasicThermophysicalMode ls.so"
#8 Foam::basicThermo::addfvMeshConstructorToTable > > > >
> >::New(Foam::fvMesh const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libbasicThermophysicalMode ls.so"
#9 Foam::basicThermo::New(Foam::fvMesh const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libbasicThermophysicalMode ls.so"
#10 main at
~/OpenFOAM/aa-1.5.x/applications/yPlusRASCompMultiRegion/yPlusRASCompMultiRegion .C:152
#11 __libc_start_main in "/lib/libc.so.6"
#12 _start in
"/home/aa/OpenFOAM/aa-1.5.x/applications/bin/linux64GccDPOpt/yPlusRASCompMultiRe gion"

>From function genericFvPatchField::genericFvPatchField(const fvPatch&
p, const DimensionedField& iF)
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at
line 45.

FOAM aborting

Aborted

I was searching a bit in the forum and found an entry explaining the error message I received (http://www.cfd-online.com/OpenFOAM_D...ges/1/593.html). So it seems that the solid-fluid interface air_to_ceiling is a default or generic patch field, and hence does not know how to evaluate itself, but what in turn would be necessary to calculated an enthalpy field h (by basicThermo).
When I set disallowGenericFvPatchField to 1 I get the message below:

Create time

Create fluid mesh for region air for time = 0.001

Time = 0.001
Reading field p

Reading thermophysical properties

Selecting thermodynamics package hThermo<pureMixture<constTransport<specieThermo<hC onstThermo<perfectGas>>>>>


Unknown patchField type solidWallMixedTemperatureCoupled for patch type wall

Valid patchField types are :

47
(
fixedGradient
mixedEnthalpy
.
.
etc.
)


file: /home/aa/OpenFOAM/aa-1.5.x/run/chtMultiRegionFoam/hotPlume2D/grid_005/0.001/air/T::air_to_ceiling from line 46 to line 51.

From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /home/aa/OpenFOAM/OpenFOAM-1.5.x/src/finiteVolume/lnInclude/newFvPatchField.C at line 111.

FOAM exiting

I checked the code of basicThermo.C and saw that there the case of a mixed BC is handled, so I don t know why the solidWallMixedTemperatureCoupled is not allowed.
I would greatly appreciate any comments and advice!!

Thanks in advance,
Aram

mabinty March 27, 2009 11:13

Hi!!

I m about to adapt other utilities like e.g. wallHeatFlux for the multi region case and run always into the same problem. I checked different codes mentioned in the error messages but couldn t find anything out yet; I m stuck now. I kindly ask the community for help, as I strongly depend on these utilities!!!

Thx in advance,
Aram

gschaider April 9, 2009 13:59

Hi Aram!

The Problem is that the boundary condition in question is only known to the cht-Solver. Have a look at the sources of the solver somewhere in $FOAM_SOLVERS/heatTransfer, you will find it there.

The quickest fix might be to add these boundary-conditions to your utility (Add the the C-files to Make/files).

Bernhard

mabinty April 14, 2009 11:30

Hi Bernhard!!

Thank you very much for the great help!! I included the boundary condition as well as the couple manager in the Make/files,options of the utility and it compiles and runs now. I would have two comments:

1.) The first time I ran the utility for a multiRegion case no yPlus was calculated for the new interface air_to_ceiling as its patch type is set to "patch" (I assume by the utility splitMeshRegions) in 0.001/air/polyMesh/boundary. Hence, I changed it to "wall" before exicuting chtMultiRegionFoam and then it worked :) . I ll try to automatize that. My question now, where else, exept in 0.001/air/polyMesh/boundary are the patch types of boundary faces stored (when I change the patch type after exicuting chtMultiRegionFoam and then run yPlus air_to_ceiling is not recognized as wall)?

2.) Other utilities like e.g. wallHeatFlux would also need the mentioned boundary condition. Is it possible to put them into a library so that all of them have access, or do I have to compile each of the utilities with the BC included in the Make/files,option?

Thx again for the help!! Regards,
Aram

gschaider April 14, 2009 15:42

Quote:

Originally Posted by mabinty (Post 212857)
Hi Bernhard!!

Thank you very much for the great help!! I included the boundary condition as well as the couple manager in the Make/files,options of the utility and it compiles and runs now. I would have two comments:

1.) The first time I ran the utility for a multiRegion case no yPlus was calculated for the new interface air_to_ceiling as its patch type is set to "patch" (I assume by the utility splitMeshRegions) in 0.001/air/polyMesh/boundary. Hence, I changed it to "wall" before exicuting chtMultiRegionFoam and then it worked :) . I ll try to automatize that. My question now, where else, exept in 0.001/air/polyMesh/boundary are the patch types of boundary faces stored (when I change the patch type after exicuting chtMultiRegionFoam and then run yPlus air_to_ceiling is not recognized as wall)?

I think that the wall-info is only stored in the boundary-file you mentioned. I guess that splitMeshRegions simply can not create walls

Quote:

Originally Posted by mabinty (Post 212857)
2.) Other utilities like e.g. wallHeatFlux would also need the mentioned boundary condition. Is it possible to put them into a library so that all of them have access, or do I have to compile each of the utilities with the BC included in the Make/files,option?

Thx again for the help!! Regards,
Aram

No. You can create a library with the necessary boundary conditions (lets say libchtBCs.so) and then add the line

libs ( "libchtBCs.so");

to the controlDict. Then it is loaded as a "plugin" for every application. Don't know what happens with the solver though (because for that the BCs will be defined twice)

Bernhard

mabinty April 15, 2009 02:53

Hi Bernhard!

Thanks for the fast reply! I ll try the version with the BC in a library and report.

Regards,
Aram

markusrehm July 2, 2009 06:24

Wall Heat Flux
 
Hi Aram,

have you succeeded in creating the library? I am also thinking about how to implement constant heat flux at the walls for a combustion solver.

Regards Markus.

mabinty July 2, 2009 07:51

Dear Markus,

no; honestly I did not try as I had to write new utilities (for yPlus and wallHeatFlux) anyway. So I included the BCs of interest and compiled them together. This works well for me and is doing what I need.
In case you plan to work on such a library I am still interested and would greatly appreciate it if you could share your findings.

All the best,
Aram


All times are GMT -4. The time now is 12:53.