|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 9 ![]() |
Hi,
I am using externalWallHeatFluxTemperature BC and choose mode q to give constant heat flux on the wall. After running the case, I am using wallHeatFlux tools to check the q. But what confused me is that it gives the min/max/integral value and min/max is different and their value is different from the setting value. So I am confused that if I set constant q, the checking result should be the same as I set. But it did not. I am using tabulated table to obtain the thermopropertites. So kappa/Cp/mu is changing with temperature. I do not know if it will influence the BC. Any hint is highly appreciated. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Arvind Jay
Join Date: Sep 2012
Posts: 97
Rep Power: 15 ![]() |
Hi,
I don't see any discrepancy between the heat flux set in externalWallHeatFluxTemperaure bc and the one computed from the wallHeatFlux postProcess utility. I earlier had issues with of1812 switching to of6 solved it. Cheers, Jay |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 9 ![]() |
Quote:
If I use constant thermoPhysicalProperties or the thermoProperties are not changing much, the checking result by wallHeatFlux is the same as the setting one in BC. However, if the thermoPhysicalProperties are changing with temperature rapidly, the checking result is different with the setting one. Kappa is not constant and I do not know if it affects the result. In the code: Code:
case fixedHeatFlux: { refGrad() = (q_ + qr)/kappa(Tp); refValue() = 0; valueFraction() = 0; |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 15 ![]() |
Hi!
If you have a converged solution they should be the same! If your case is not converged they can be different. In the equations you are using the temperature gradient which is calculated from the defined flux. So during the solution (correct me if I'm wrong), you do something like this: You set the gradient using the current kappa -> you get the new temperature field. In the post-processing step you calculate the heat flux with this temperature field where you have a new kappa (temperature dependent kappa). Since you use 2 different kappa you'll have 2 different results. If you have a converged solution, the kappa used for the gradient is the same as the kappa used for the flux calculation in the post-processing step so you have to get back the heat flux what you have defined in the BC. |
|
![]() |
![]() |
![]() |
![]() |
#5 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 9 ![]() |
Quote:
I check the code of wallHeatFlux, it calculate heat flux by: Code:
surfaceScalarField heatFlux ( fvc::interpolate(alpha)*fvc::snGrad(he) ); Or maybe they calculate q in different ways so different results happen. I am now using tabulated method so the thermoPhysicalProperties are read from tabulated table. When I test water where thermoPhysicalProperties is not changing strongly, the heat flux checking result is fine. But when I test supercritical CO2 with strongly-changed properties, The result seems confusing. Any hint is highly appreciated. Regards, Calf.Z |
||
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 15 ![]() |
Okay It is a bit tricky. I should check in the code but I tried to figure out this a long time ago and if I'm remember well, kappa is inherited from the thermal model, so what is kappa actually is depends on the thermal model. Solid thermo, fluid thermo(const, sutherland, etc.) So you can check it for yourself in the doxygen for your case what is kappa exactly.
But anyways. With a converged case your flux have to be fine. Maybe your case is not converged. Check some physical quantities, not residuals. Or maybe monitor the min and max value of the heatFlux. If it is oscillating you need more iterations. If it is oscillating try to use a little relaxation in the hEqn. When everything is dependent of the temperature, It can be hard to reach a converged solution. |
|
![]() |
![]() |
![]() |
![]() |
#7 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 9 ![]() |
Quote:
I am using tabular table to read thermoproperties which are changed with T. So I modify the code of rhoThermo to create a new library which can meet the function of tabular table. So I am not sure if kappaMethod : fluidThermo is suitable for my case. I have monitored the min and max value of the heatFlux. For the normal result, min and max should be the same and they are both equal to the setting one in BC, is it right? For my case, min and max are different and they form the range. The residual of H is stay constant and the case meet the mass balance and energy balance. So I stop it to have a check. Maybe I should lower the residual standard to have more iterations. |
||
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 15 ![]() |
And what if you create a polynomial which is fit your data (10 sec work in excel) and use polynomial thermal properties. So you don't have any "tricks" involved.
I don't think if there is a bug in the code. At least I had no problem with it. |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Member
Arvind Jay
Join Date: Sep 2012
Posts: 97
Rep Power: 15 ![]() |
Here is the icoPoly for Water
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type heRhoThermo; mixture pureMixture; transport polynomial; thermo hPolynomial; equationOfState icoPolynomial; specie specie; energy sensibleEnthalpy; } dpdt off; mixture { specie { molWeight 18; } equationOfState { rhoCoeffs<8> (838.46 1.4 -0.003 3.72e-07 0.0 0.0 0.0 0.0); } thermodynamics { CpCoeffs<8> (12010.1 -80.4 0.31 -0.000538 3.62e-07 0.0 0.0 0.0); Hf 0; //Hf -286000.0; Sf 0; //Sf 69.95; } transport { kappaCoeffs<8> (-0.869 0.00895 -1.58e-05 7.97e-09 0.0 0.0 0.0 0.0); muCoeffs<8> (0.0374 -3.093e-4 9.609e-7 -1.32e-9 6.746e-13 0 0.0 0.0); } } // ************************************************************************* // |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 9 ![]() |
Is polynomial that easy? My simulation is about supercritical carbon dioxide which thermoProperties is changing strongly with T. Where can I learn about polynomial method? Thank you.
|
|
![]() |
![]() |
![]() |
![]() |
#11 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 9 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting the height of the stream in the free channel | kevinmccartin | CFX | 12 | October 13, 2022 21:43 |
How do you use heat flux as a boundary condition in a non-wall area in UDF? | JuBong | Fluent UDF and Scheme Programming | 2 | July 2, 2018 21:15 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 07:00 |
Constant Heat Flux Boundary Condition on Long Thin Pipe | CGramlich | SU2 | 3 | April 22, 2013 08:25 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 08:56 |