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

externalWallHeatFluxTemperature BC in turbulent flow

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2020, 09:09
Default externalWallHeatFluxTemperature BC in turbulent flow
  #1
Member
 
Piotr Ładyński
Join Date: Apr 2017
Posts: 41
Rep Power: 4
piotr.mecht is on a distinguished road
I wanted to find the easiest way to simulate flow in the channel with one patch being specified as a constant heat flux or constant heat power source.

There is a BC called externalWallHeatFluxTemperature which provides varying temperature field according to required heat flux/power. It seems to work well, unless you turn turbulenece model on. It crashes on the first iteration with division by zero exception. I've tried to reduce relaxation factors to 0.1 and changed my schemes to upwind for max stability, but it didn't help at all. Is there any chance to make it work this way ?

Code:
Starting time loop

Time = 1

DILUPBiCGStab:  Solving for h, Initial residual = 0.986233, Final residual = 0.00220438, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.999392, Final residual = 0.0018794, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 0.196606, Final residual = 0.00138496, No Iterations 9
GAMG:  Solving for p_rgh, Initial residual = 3.1198e-05, Final residual = 1.18706e-07, No Iterations 10
time step continuity errors : sum local = 0.00354071, global = -0.000519767, cumulative = -0.000519767
rho max/min : 997 978.866
DILUPBiCGStab:  Solving for epsilon, Initial residual = 0.112274, Final residual = 8.83977e-05, No Iterations 1
bounding epsilon, min: -0.00162638 max: 0.27328 average: 0.000906018
DILUPBiCGStab:  Solving for k, Initial residual = 1, Final residual = 8.26542e-05, No Iterations 1
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  ? in "/lib/x86_64-linux-gnu/libm.so.6"
#4  pow in "/lib/x86_64-linux-gnu/libm.so.6"
#5  Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::Psmooth(double) const at ??:?
#6  Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() at ??:?
#7  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/buoyantSimpleFoam"
#8  Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > >::correctNut() at ??:?
#9  Foam::RASModels::kEpsilon<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correctNut() at ??:?
#10  Foam::RASModels::kEpsilon<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correct() at ??:?
#11  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/buoyantSimpleFoam"
#12  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#13  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/buoyantSimpleFoam"
Temperature
Code:
Heater
    {
        type            externalWallHeatFluxTemperature;        
        mode            power;
        Q               300;
        value           uniform 298.15;
        kappaMethod     fluidThermo;      
    }
Turbulence model k-epsilon, Re~3000
piotr.mecht is offline   Reply With Quote

Old   February 11, 2020, 09:37
Default
  #2
HPE
Senior Member
 
Herpes Free Engineer
Join Date: Sep 2019
Posts: 298
Rep Power: 3
HPE is on a distinguished road
any setup you can provide? so that the readers can try to replicate the issue?
__________________
Kind regards,
HPE

The OpenFOAM community is the biggest contributor to OpenFOAM; not person A or B. Let's report bugs or issue feature requests in GitLab-OpenFOAM.

Please `design` your questions well. Such effort always pays off well for inquirers and `helpmate`s:
How to create a Minimal, Reproducible Example,
How to give enough info to get help.
HPE is offline   Reply With Quote

Old   February 11, 2020, 10:42
Default
  #3
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 337
Rep Power: 8
simrego is on a distinguished road
Hi!


I have used this BC many times with turbulent flow without any problems... The problem should be something else not the BC itself..
Check your BCs related to the turbuelnce (alphat, nut, etc..) since your solver crashes there... But you can try to just simply set this BC to some fixedValue to see if the problem is still there...
simrego is offline   Reply With Quote

Old   February 11, 2020, 12:57
Default
  #4
Member
 
Piotr Ładyński
Join Date: Apr 2017
Posts: 41
Rep Power: 4
piotr.mecht is on a distinguished road
Thanks for your reply


I pepared a version with some sharable, similiar geometry.



blockMesh + snappyHexMesh (any layers)
Attached Files
File Type: zip heatingElementTest.zip (17.9 KB, 1 views)
piotr.mecht is offline   Reply With Quote

Old   February 11, 2020, 13:58
Default
  #5
HPE
Senior Member
 
Herpes Free Engineer
Join Date: Sep 2019
Posts: 298
Rep Power: 3
HPE is on a distinguished road
I don't use `groovyBC`, I'm afraid. So couldn't replicate the issue on the test case you provided.
__________________
Kind regards,
HPE

The OpenFOAM community is the biggest contributor to OpenFOAM; not person A or B. Let's report bugs or issue feature requests in GitLab-OpenFOAM.

Please `design` your questions well. Such effort always pays off well for inquirers and `helpmate`s:
How to create a Minimal, Reproducible Example,
How to give enough info to get help.
HPE is offline   Reply With Quote

Old   February 11, 2020, 15:38
Default
  #6
Member
 
Piotr Ładyński
Join Date: Apr 2017
Posts: 41
Rep Power: 4
piotr.mecht is on a distinguished road
Quote:
Originally Posted by HPE View Post
I don't use `groovyBC`, I'm afraid. So couldn't replicate the issue on the test case you provided.

This file set works without groovyBC (i generated non-uniform list, so it might not fit other mesh settings). I used groovyBC to provide non-uniform velocity field with ease, but my issue applies to uniform inlet velocity field too, so you can delete non-uniform list as well and set Inlet velocity to uniform (0.12 0 0), still crashes at the first time step.
Attached Files
File Type: zip heatingElementTest _noGroovyBC.zip (35.0 KB, 1 views)
piotr.mecht is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Turbulent flow entering laminar domain arjdk FLUENT 0 November 21, 2017 05:38
Why can i use a laminar solver for a turbulent flow? [Heat transfer problem] blackbow CFX 1 November 22, 2016 05:42
Particle deposition on circular cylinder in turbulent flow Julian K. CFX 1 October 3, 2011 18:51
Difference between recirculation zone and turbulent flow region ashtonJ Main CFD Forum 0 September 16, 2011 04:46
Inviscid Drag at subsonic, subcritical Mach # Axel Rohde Main CFD Forum 1 November 19, 2001 13:19


All times are GMT -4. The time now is 09:08.