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

Heat source in solid

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

Like Tree2Likes
  • 2 Post By Bloerb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2019, 08:31
Default Heat source in solid
  #1
New Member
 
ShinyRiver's Avatar
 
Roozbeh
Join Date: Aug 2016
Location: Stuttgart, Germany
Posts: 8
Rep Power: 10
ShinyRiver is on a distinguished road
Hi guys,


I would like to model a uniform non-local heat generation or heat source within a solid in openFOAM. In FLUENT that could be explicitly set in defining the solid zone, but in openFOAM I am not sure if it is easily available. Does someone have an idea to do that in openFOAM without having to edit the source code?


Thanks for your support
ShinyRiver is offline   Reply With Quote

Old   February 11, 2019, 08:55
Default
  #2
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
Add an fvOption file to your region folder. Either constant/solid or system/solid depending on your OF version.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system/solid";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

options
{
    energySource
    {
        type            scalarSemiImplicitSource;

        selectionMode   all; // or only part of the domain via a cellZone e.g defined with topoSet

        volumeMode      specific; // source term per volume or total
        injectionRateSuSp
        {
            h      (1.5e6 0);   // explicit and implicit part of the source term
        }
    }
}

// ************************************************************************* /
This adds a temperature independent source term in either W or W/m³ depending on the volumeMode. The second number in the injectionRateSuSp(here 0) would be the implicit part and hence the temperature dependent one. Requires a solver which uses fvOption like chtMultiRegion
ShinyRiver and marcoberna23 like this.
Bloerb is offline   Reply With Quote

Old   February 28, 2019, 06:23
Default
  #3
New Member
 
Kevin Habrock
Join Date: Oct 2018
Posts: 22
Rep Power: 8
Kevin.H is on a distinguished road
Hallo,

I try to implement a heat source for a solid as well, but it didn“t worked.
Maybe you can find my Problem.
I use OpenFoam 4.1 and it is a chtMultiRegion case.

Code:
heatSource
{
    type            scalarSemiImplicitSource;
    active          true;
 
    scalarSemiImplicitSourceCoeffs
    {
        selectionMode   all; // all, cellSet, cellZone, points
        cellSet         magnet;
        volumeMode      specific; // absolute;
        injectionRateSuSp
        {
           T     (400 0); 
//        h      (1.5e6 0); 
        }
    }
}
Because of the number of Cells I know that OpenFoam set the source into the right Regions:
Code:
Creating finite volume options from "system/fvOptions"
Selecting finite volume options model type scalarSemiImplicitSource
    Source: heatSource
    - selecting all cells
    - selected 35200 cell(s) with volume 4.08615e-05
But than I get this result, and nothing happened.
I think wir h it works fine, but when I try to implement a Temperature it doesn“t work.

Code:
Solving for solid region magnet
--> FOAM Warning : 
    From function virtual void Foam::fv::option::checkApplied() const
    in file cfdTools/general/fvOptions/fvOption.C at line 118
    Source heatSource defined for field T but never used
--> FOAM Warning : 
    From function virtual void Foam::fv::option::checkApplied() const
    in file cfdTools/general/fvOptions/fvOption.C at line 118
    Source heatSource defined for field T but never used
DICPCG:  Solving for h, Initial residual = 0.812167, Final residual = 0.0564586, No Iterations 14
Min/max T:241.843 293.675
ExecutionTime = 72.39 s  ClockTime = 72 s
Do anyone of u maybe now why it doenst work with T?

Source: http://caefn.com/openfoam/fvoptions-semiimplicitsource

And can maybe anyone explain how I can calculate the HeatFlux (Q(Point)), when I know the h and the A but not the Delta T.

Delta T = internalField Region A - internalField Region B ?

Thank u very much for your help!!

And mabye another Question: In my cases I recocnice that when I change the internalField of a solid to 400K, nothing happend too.
Is this normal?

Best regards
Kevin.H is offline   Reply With Quote

Old   March 13, 2019, 02:26
Default
  #4
New Member
 
Kevin Habrock
Join Date: Oct 2018
Posts: 22
Rep Power: 8
Kevin.H is on a distinguished road
Or I should ask other questions.
If I use the scalarSemiImplicitSource in this way, do I give the CellCet magnet a heat flux of 25Watt?

Code:
heatSource
{
    type            scalarSemiImplicitSource;
    active          true;
 
    scalarSemiImplicitSourceCoeffs
    {
        selectionMode   all; // all, cellSet, cellZone, Points
        cellSet         magnet;
        volumeMode      absolute; 
        injectionRateSuSp
        {         h      (25 0); 
        }
    }
}
EDIT: It seems to be right
When I use wallHeatFlux than the result is fine.
Thanks!

Last edited by Kevin.H; March 13, 2019 at 05:32.
Kevin.H 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
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 08:06
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
UDF Scalar Code: HT 1 Greg Perkins FLUENT 8 October 20, 2000 12:40
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 13, 2000 23:03


All times are GMT -4. The time now is 05:52.