Closed deepbandivadekar closed 5 years ago
Hello -
Based on your post, I see you have two regions, named fluid
and solid
.
Therefore, please try
postProcess -func wallHeatFlux -region fluid
The polyMesh error is due to your not specifying the region.
Your use of the function in controlDict should also require you specify the region. If memory serves, it is as simple as adding the following to the script wallHeatFlux:
region fluid;
Thanks for quick reply. Though, this doesn't work. I did try this in the variations I mentioned about.
Edit: If it helps, here's the corresponding error
postProcess -func wallHeatFlux -region fluid
--> FOAM FATAL ERROR: Unable to find compressible turbulence model in the database
From function virtual bool Foam::functionObjects::wallHeatFlux::execute() in file wallHeatFlux/wallHeatFlux.C at line 237.
FOAM exiting
Hmm. Well, you can do some programming, or you can just trick OpenFOAM. If you don't mind not being elegant...
cp the contents of fluid
into constant
. That includes the polyMesh
directory plus thermoPhyiscalProperties
and turbulenceProperties
.
cp system/fvSchemes
and system/fvSolution
to system
For the time step of interest, cp the contents of the fluid directory (e.g., p, phi, rho, T, and U) up one "directory level" so that, for example, under time 0.001
you find p, phi, rho, etc. etc.
use rhoPimpleFoam to get the wall heat flux.
e.g.,
rhoPimpleFoam -postProcess -func wallHeatFlux -latestTime
I didn't run the laminar superSonicCorner case to completion... just ran to 0.0066 seconds. Here's the result of the rhoPimpleFoam postProcess:
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 6-e29811f5dff8
Exec : rhoPimpleFoam -postProcess -func wallHeatFlux -latestTime
Date : May 17 2019
Time : 11:55:55
Host : "aris"
PID : 4550
I/O : uncollated
Case : /home/eadaymo/OpenFOAM/eadaymo-6/applications/hybridCentralSolvers/Tutorials/superSonicCone/laminar-redo
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 0.0066
PIMPLE: No convergence criteria found
PIMPLE: No corrector convergence criteria found
Calclations will do 2 corrections
wallHeatFlux wallHeatFlux:
processing all wall patches
Time = 0.0066
Reading thermophysical properties
Selecting thermodynamics package
{
type hePsiThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleEnthalpy;
}
Reading field U
Reading/calculating face flux field phi
Creating turbulence model
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
Creating field dpdt
Creating field kinetic energy K
No MRF models present
No finite volume options present
wallHeatFlux wallHeatFlux write:
writing object wallHeatFlux
min/max/integ(cone_fluid) = -718.076, -6.62934, -2.197
End
Hope this helps... Like I said it's not elegant, but may just get you the result you need.
Here's the fancier approach.
I added postProcess.H to the chtMultiRegionSolver... I had to do a few more edits to get it to compile. Use at your own risk - I did not test thoroughly.
When you compile the attached you'll get chtMultiRegionCentralFoam-postProcess.
chtMultiRegionCentralFoam-postProcess.tar.gz
Following a tutorial, you can run:
chtMultiRegionCentralFoam-postProcess -postProcess -func wallHeatFlux -region
And get heat fluxes like the following:
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 6-e29811f5dff8
Exec : chtMultiRegionCentralFoam-postProcess -postProcess -func wallHeatFlux -region fluid
Date : May 17 2019
Time : 12:02:23
Host : "aris"
PID : 4786
I/O : uncollated
Case : /home/eadaymo/OpenFOAM/eadaymo-6/applications/hybridCentralSolvers/Tutorials/superSonicCone/laminar-redo
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create fluid mesh for region fluid for time = 0
Create solid mesh for region solid for time = 0
wallHeatFlux wallHeatFlux:
processing all wall patches
Time = 0
Reading thermophysical properties
Selecting thermodynamics package
{
type hePsiThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleEnthalpy;
}
Reading field U
Creating field kinetic energy K
PIMPLE: No convergence criteria found
PIMPLE: No corrector convergence criteria found
Calclations will do 2 corrections
Selecting finite volume kappaFunction type standardMachToAcCourantRatio
Creating turbulence model
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No finite volume options present
No MRF models present
Marking cells with bad quality to limit pressure gradient
max/min FaceAcCourant: 0.72/1.0903e-23
max/min Maf: 5.00866/0
max/min kappa: 1/0
*** Reading solid mesh thermophysical properties for region solid
Adding to thermos
Selecting thermodynamics package
{
type heSolidThermo;
mixture pureMixture;
transport constIso;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
Adding to radiations
Selecting radiationModel opaqueSolid
Selecting absorptionEmissionModel constantAbsorptionEmission
Selecting scatterModel none
Selecting sootModel none
Adding fvOptions
wallHeatFlux wallHeatFlux write:
writing object wallHeatFlux
min/max/integ(cone_fluid) = 0, 0, 0
Time = 0.0002
Reading thermophysical properties
Selecting thermodynamics package
{
type hePsiThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleEnthalpy;
}
Reading field U
Creating field kinetic energy K
PIMPLE: No convergence criteria found
PIMPLE: No corrector convergence criteria found
Calclations will do 2 corrections
Selecting finite volume kappaFunction type standardMachToAcCourantRatio
Creating turbulence model
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No finite volume options present
No MRF models present
Marking cells with bad quality to limit pressure gradient
max/min FaceAcCourant: 0.946666/1.43302e-23
max/min Maf: 5.22189/0
max/min kappa: 1/0
*** Reading solid mesh thermophysical properties for region solid
Adding to thermos
Selecting thermodynamics package
{
type heSolidThermo;
mixture pureMixture;
transport constIso;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
Adding to radiations
Selecting radiationModel opaqueSolid
Selecting absorptionEmissionModel constantAbsorptionEmission
Selecting scatterModel none
Selecting sootModel none
Adding fvOptions
wallHeatFlux wallHeatFlux write:
writing object wallHeatFlux
min/max/integ(cone_fluid) = -2.89064e-12, 3.1529e-12, -3.54824e-15
.
.
.
etc.
Thanks a lot for this! This works for now. There is some issue with parallel running, but that's another topic.
Glad it works. Not sure what to say on the parallel issue, though. Hope this keeps you moving forward. Cheers
Dear colleagues, i would like to stress, that only OpenFOAM+ fork of OpenFOAM technology is now supported, so please use appropriate branches of repository
This is for OF6 branch and Ubuntu 18.04. I faced problems using wallHeatFlux utility for the chtMultiRegionCentralFoam solver for provided tutorial case (superSonicCone). I am wondering is it doesn't support this utility or perhaps if am not using it right. How do I calculate the heat flux on the solid surface?
I tried following but doesn't work with any variations: e.g.
chtMultiRegionCentralFoam -postProcess -func wallHeatFlux
OR
postProcess -func wallHeatFlux
OR, alternatively: included the following snippet in the controlDict:
functions {#includeFunc wallHeatFlux}
This is true for
MachNo
as well. Could you please clarify about this? Thanks