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

implement heat flux

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 18, 2011, 17:19
Unhappy implement heat flux
  #1
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
hey together,

i am using OF 1.7.x and working with OF for a half year now.
Using the chtMultiRegionSimpleFoam to solve the heat transfer from fluid to solid and
solid to solid.

The solutions are very good and now i want to implement the heat flux in the cht..Foam so that i can visual it like U / rho / etc in paraview.

First of all i want to implement the heat flux in my solid regions.
Code:
Q = lambda / delta * A * dT  =  K * A * dT

and q = Q/A   

q = K * dT     (is this correct?) 

 q = - K * grad(T)
I changed this files in the ~/applications/solver/heatTransfer/chtMultiRegionSimpleFoam/solid/:

createSolidFields.H
Code:
        Info<< " Adding to fluxs\n" << endl;
        fluxs.set
        (
            i,
            new volScalarField
            (
                IOobject
                (
                    "flux",
                    runTime.timeName(),
                    solidRegions[i],
                    IOobject::MUST_READ,
                    IOobject::AUTO_WRITE
                ),
                solidRegions[i]
            )
        );


setRegionSolidFields.H
Code:
volScalarField& flux = fluxs[i];

solveSolid.H
Code:
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix tEqn ( -fvm::laplacian(K, T) ); tEqn.relax(); eqnResidual = tEqn.solve().initialResidual(); maxResidual = max(eqnResidual, maxResidual); // solving heatflux fvScalarMatrix fluxEqn ( -K*fvc::grad(T) ); fluxEqn.relax(); eqnResidual = fluxEqn.solve().initialResidual(); maxResidual = max(eqnResidual, maxResidual); }
if i add "-K*fvc::grad(T) i got a error while compiling.

Don 't know how to implement q = K * grad(T)
and if this code is correct ... ??? tried some other codes but always got an error...
Code:
    fvScalarMatrix fluxEqn
        (
          
           -K*fvc::grad(T)
        );
        fluxEqn.relax();
        eqnResidual =          fluxEqn.solve().initialResidual();
        maxResidual = max(eqnResidual, maxResidual);


Its the first time i want to add a equation and i am not sure how i have to implement this? I think i got all wrong or?

Can someone help me - thanks ?

Tobi
Tobi is offline   Reply With Quote

 


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
Sign of Heat Flux at wall Kyung FLUENT 2 February 26, 2016 16:25
Variable name for heat flux peterle CFX 4 February 13, 2014 02:21
Heat Flux Wall Boundary Confusion. Joee FLUENT 1 August 21, 2010 12:20
Heat flux in ansys cfx juliom OpenFOAM Running, Solving & CFD 2 April 14, 2009 14:30
Heat Transfer Coeff. at Heat Flux Boundary Rushyen CFX 6 January 18, 2001 05:09


All times are GMT -4. The time now is 19:49.