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

Heat flux BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2014, 19:58
Default Heat flux BC
  #1
New Member
 
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 12
lfrigeri3 is on a distinguished road
Hi,
I'm me again and I've another problem in my famous room.

The room has inlet, outlet and a window. The other walls and floor are insulated.

The window has a internal surface temperature of 18°C and I know the heat flux (-218W/m^2) , yes out is cold. I don't know conductivity and thickness of the window, so I can't calculate the gradient.

In my 0/T , how can I set the BC for the window? Is it enough if I just set 18°C as fixedValue?

I tried also with:
HTML Code:
type           compressible::turbulentHeatFluxTemperature;
heatSource     flux;
q                  uniform -218;
kappa            basicThermo;
value            uniform 305;
but I have this error:
HTML Code:
--> FOAM FATAL IO ERROR:
basicThermo is not in enumeration:
4
(
directionalSolidThermo
fluidThermo
lookup
solidThermo
)
How can I solve this error?
What solution is better? How can I solve this error?

Thanks
lfrigeri3 is offline   Reply With Quote

Old   February 10, 2014, 19:05
Default
  #2
New Member
 
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 12
lfrigeri3 is on a distinguished road
No answers?
lfrigeri3 is offline   Reply With Quote

Old   February 11, 2014, 00:14
Default
  #3
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15
ahmmedshakil is on a distinguished road
You can add as the heat loss from the surface as Qloss, just add the term in the governing equation. I guess this is the easiest way.
ahmmedshakil is offline   Reply With Quote

Old   February 16, 2014, 11:50
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Luca: Have you tried using:
Code:
kappa  fluidThermo;
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 16, 2014, 11:55
Default
  #5
New Member
 
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 12
lfrigeri3 is on a distinguished road
Yes but it doesnt work i'll send the error later
lfrigeri3 is offline   Reply With Quote

Old   February 16, 2014, 17:35
Default
  #6
New Member
 
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 12
lfrigeri3 is on a distinguished road
Ok i tried to solve some errors, but every time it give me another error ... and now i'm stuck.

Code:
Time = 1

DILUPBiCG:  Solving for Ux, Initial residual = 0.000315202, Final residual = 1.81125e-06, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.000383197, Final residual = 2.00909e-06, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.000448386, Final residual = 3.1772e-06, No Iterations 2


--> FOAM FATAL ERROR:

    lookup of turbulenceModel from objectRegistry region0 successful
    but it is not a turbulenceModel, it is a kOmegaSST

    From function objectRegistry::lookupObject<Type>(const word&) const
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 147.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::compressible::turbulenceModel const& Foam::objectRegistry::lookupObject<Foam::compressible::turbulenceModel>(Foam::word const&) const at ??:?
#3  Foam::temperatureCoupledBase::kappa(Foam::Field<double> const&) const at ??:?
#4  Foam::compressible::turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs() at ??:?
#5  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::updateCoeffs() at ??:?
#6  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
#7
 at ??:?
#8
 at ??:?
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
 at ??:?
Aborted (core dumped)
I think I have to change something in temperature boundary condition...but i don't know how
lfrigeri3 is offline   Reply With Quote

Old   February 22, 2014, 11:35
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Luca,

From the description you've made on the first post, could you please create a modified case using the tutorial "heatTransfer/buoyantSimpleFoam/hotRoom", using the same settings you're using and share it with us?
I ask this because this way we (anyone reading this thread) would be able to more easily reproduce the same problem and try to find a solution.

Otherwise, it will take considerable time for anyone else to set-up the same case and attempt at reproducing the same problem.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 22, 2014, 11:50
Default
  #8
New Member
 
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 12
lfrigeri3 is on a distinguished road
This is the test-case, with a very very simple mesh

I tried to manipulate this case by myself..I'm a newbie so sure there will be stupid errors.. but everyone learn from their mistakes

Thanks
Attached Files
File Type: zip Prova.zip (14.5 KB, 18 views)
lfrigeri3 is offline   Reply With Quote

Old   February 22, 2014, 12:54
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Luca,

Attached is a working case, albeit not realistic at all. I simply took a hammer, a few nails and made it work without wobling

This is the whole list of changes made... but very cryptic looking, aren't they:
Code:
diff -Nur Prova/0/T.org Prova2/0/T.org
--- Prova/0/T.org    2014-02-16 21:33:08.000000000 +0000
+++ Prova2/0/T.org    2014-02-22 16:28:44.768521049 +0000
@@ -22,11 +22,10 @@
 {
     floor
     {
-        type           compressible::turbulentHeatFluxTemperature;
+        type            turbulentHeatFluxTemperature;
         heatSource      flux;
         q               uniform 10;
-        kappa           fluidThermo;
-    kappaName    fluidThermo;
+        alphaEff        alphat;
         value           uniform 305;
     }
     ceiling
diff -Nur Prova/constant/transportProperties Prova2/constant/transportProperties
--- Prova/constant/transportProperties    2014-02-16 20:55:43.000000000 +0000
+++ Prova2/constant/transportProperties    2014-02-22 16:30:03.320518263 +0000
@@ -21,6 +21,7 @@
 TRef        TRef [0 0 0 1 0 0 0] 298;
 Pr              Pr [0 0 0 0 0 0 0] 0.73;
 Prt             Prt [0 0 0 0 0 0 0] 0.85;
+Cp0             1.3;
 
 CrossPowerLawCoeffs
 {
diff -Nur Prova/system/fvSchemes Prova2/system/fvSchemes
--- Prova/system/fvSchemes    2014-02-16 21:26:43.000000000 +0000
+++ Prova2/system/fvSchemes    2014-02-22 16:38:19.752500655 +0000
@@ -16,42 +16,40 @@
 
 ddtSchemes
 {
-    default Euler;
+    default         steadyState;
 }
 
 gradSchemes
 {
     default         Gauss linear;
-    grad(p)         Gauss linear;
-    grad(U)         Gauss linear;
 }
 
 divSchemes
 {
-    default          none;
-    div(phi,U)       Gauss  linearUpwind Gauss;
-    div(phi,k)       Gauss  upwind;
-    div(phi,epsilon) Gauss  upwind;
-    div(phi,omega)   Gauss  upwind;
-    div((muEff*dev(T(grad(U))))) Gauss linear;
+    default         none;
+    div(phi,U)      bounded Gauss upwind;
+    div(phi,T)      bounded Gauss upwind;
+    div(phi,k)      bounded Gauss upwind;
+    div(phi,epsilon) bounded Gauss upwind;
     div((nuEff*dev(T(grad(U))))) Gauss linear;
+    div(phi,omega) bounded Gauss linear;
 }
 
 laplacianSchemes
 {
-    default                     none;
-    laplacian(nuEff,U)             Gauss linear corrected;
-    laplacian((1|A(U)),p)        Gauss linear corrected;
-    laplacian(DkEff,k)             Gauss linear corrected;
-    laplacian(DomegaEff,omega)         Gauss linear corrected;
-    laplacian(DepsilonEff,epsilon)      Gauss linear corrected;
-    laplacian(1,p)                      Gauss linear corrected;
+    default         none;
+    laplacian(nuEff,U) Gauss linear corrected;
+    laplacian(Dp,p_rgh) Gauss linear corrected;
+    laplacian(alphaEff,T) Gauss linear corrected;
+    laplacian(DkEff,k) Gauss linear corrected;
+    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
+    laplacian(DREff,R) Gauss linear corrected;
+    laplacian(DomegaEff,omega) Gauss linear corrected;
 }
 
 interpolationSchemes
 {
     default         linear;
-    interpolate(U)  linear;
 }
 
 snGradSchemes
@@ -62,7 +60,7 @@
 fluxRequired
 {
     default         no;
-    p;
+    p_rgh           ;
 }
 
 // ************************************************************************* //
diff -Nur Prova/system/fvSolution Prova2/system/fvSolution
--- Prova/system/fvSolution    2014-02-16 21:24:56.000000000 +0000
+++ Prova2/system/fvSolution    2014-02-22 16:36:54.124503691 +0000
@@ -24,58 +24,52 @@
 
 solvers
 {
-
-    p PCG
+    p_rgh
     {
-        maxIter          1000;
-        preconditioner   DIC;
-        tolerance        1e-06;
-        relTol           0;
-    };
+        solver          PCG;
+        preconditioner  DIC;
+        tolerance       1e-08;
+        relTol          0.01;
+    }
 
-    U PBiCG
-    {
-        preconditioner   DILU;
-        tolerance        1e-05;
-        relTol           0;
-    };
-    k PBiCG
-    {
-        preconditioner   DILU;
-        tolerance        1e-05;
-        relTol           0;
-    };
-    omega PBiCG
+    "(U|T|k|epsilon|R|omega)"
     {
-        preconditioner   DILU;
-        tolerance        1e-05;
-        relTol           0;
-    };
-    epsilon PBiCG
-    {
-        preconditioner   DILU;
-        tolerance        1e-05;
-        relTol           0;
-    };
-
+        solver          PBiCG;
+        preconditioner  DILU;
+        tolerance       1e-05;
+        relTol          0.1;
+    }
 }
 
 SIMPLE
 {
-    nNonOrthogonalCorrectors  2;
-pRefCell            0;
-    pRefValue           0;
+    nNonOrthogonalCorrectors 0;
+    pRefCell        0;
+    pRefValue       0;
 
+    residualControl
+    {
+        p_rgh           1e-2;
+        U               1e-4;
+        T               1e-2;
+
+        // possibly check turbulence fields
+        "(k|epsilon|omega)" 1e-3;
+    }
 }
 
 relaxationFactors
 {
-    p        0.3;
-    U        0.7;
-    k        0.7;
-    epsilon  0.7;
-    omega    0.7;
+    fields
+    {
+        p_rgh           0.7;
+    }
+    equations
+    {
+        U               0.3;
+        T               0.5;
+        "(k|epsilon|R)" 0.7;
+    }
 }
 
-
 // ************************************************************************* //
Essentially, what I've done was:
  1. Looked into the source code for the boundary condition "compressible::turbulentHeatFluxTemperature". Guess what, this boundary condition cannot be used with the solver buoyantBoussinesqSimpleFoam, because it's an incompressible solver with the Boussinesq approximation for buoyancy.
  2. So I switched to the incompressible BC "turbulentHeatFluxTemperature":
    Code:
        floor
        {
            type            turbulentHeatFluxTemperature;
            heatSource      flux;
            q               uniform 10;
            alphaEff        alphat;
            value           uniform 305;
        }
  3. Had to add the entry "Cp0" to the file "constant/transportProperties". The value I used is completely random. You'll have to define the correct one for your own case.
  4. Configured the files "system/fvSchemes" and "system/fvSolution" based on the tutorial "heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/" and added in the entries that the solver complained about.
Note: The solver crashes after 400 and something iterations, because the temperature goes well beyond the 15 degree Celsius that the Boussinesq approximation allows for.

Best regards,
Bruno
Attached Files
File Type: gz Prova2.tar.gz (4.3 KB, 20 views)
__________________
wyldckat is offline   Reply With Quote

Old   February 22, 2014, 12:59
Default
  #10
New Member
 
Luca
Join Date: Feb 2014
Posts: 19
Rep Power: 12
lfrigeri3 is on a distinguished road
Thanks a lot!!

Later I will try .. even if for my thesis I'm using another set of BC and, compared to the experimental result, it seems quite good.

Then in the conclusions I will talk about this (probably better) possibility!

Thanks again!
lfrigeri3 is offline   Reply With Quote

Reply


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
Total heat transf. rate vs Total surface heat flux Renato Sousa FLUENT 1 April 14, 2020 04:27
Wall Heat Flux & Temperature Greg Perkins FLUENT 10 November 20, 2015 10:32
Enforce bounds error with heat loss boundary condition at solid walls Chander CFX 2 May 1, 2012 21:11
Negative Heat Flux shashank312 FLUENT 3 December 9, 2011 18:00
CFX - wall heat flux divarano CFX 2 December 4, 2006 17:14


All times are GMT -4. The time now is 16:48.