|
[Sponsors] |
July 27, 2015, 14:45 |
Modifying the wallHeatFlux utility
|
#1 |
Member
W. Schuyler Hinman
Join Date: Apr 2013
Location: Calgary, Alberta, Canada
Posts: 38
Rep Power: 13 |
Hello,
I am making a different version of wallHeatFlux for myself that will use the fvc::grad to calculate the gradient instead of the snGrad. This is how it looks after I modified it: Code:
#include "createFields.H" volVectorField gradh ( IOobject ( "gradh", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), fvc::grad(h) ); volScalarField wallgradh ( IOobject ( "wallgradh", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedScalar("wallgradh",dimensionSet(1,1,-2,0,0,0,0),0) ); volScalarField heatFlux ( IOobject ( "heatFlux", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedScalar("heatFlux",dimensionSet(1,0,-3,0,0,0,0),0) ); forAll(wallgradh.boundaryField(), patchI) { wallgradh.boundaryField()[patchI] = ( ( mesh.Sf().boundaryField()[patchI] ) / ( mesh.magSf().boundaryField()[patchI] ) & gradh.boundaryField()[patchI] ); } forAll(heatFlux.boundaryField(),patchI) { heatFlux.boundaryField()[patchI] = fvc::interpolate ( ( turbulence.valid() ? turbulence->alphaEff()() : thermo->alpha() ) )*wallgradh.boundaryField()[patchI]; } Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #4 Foam::operator*(Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #5 in "/home/wshinman/OpenFOAM/wshinman-2.2.1/platforms/linux64GccDPOpt/bin/mywallHeatFlux" #6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #7 in "/home/wshinman/OpenFOAM/wshinman-2.2.1/platforms/linux64GccDPOpt/bin/mywallHeatFlux" Thanks, Schuyler |
|
July 27, 2015, 15:48 |
Solved!
|
#2 |
Member
W. Schuyler Hinman
Join Date: Apr 2013
Location: Calgary, Alberta, Canada
Posts: 38
Rep Power: 13 |
I found the problem (stupid mistake by me).
The section: Code:
forAll(heatFlux.boundaryField(), patchI) { heatFlux.boundaryField()[patchI] = ( fvc::interpolate( ( turbulence.valid() ? turbulence->alphaEff()() : thermo->alpha() ) )*(wallgradh.boundaryField()[patchI]) ); } Schuyler |
|
Tags |
wallheatflux, wallnormalgradient |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
wallHeatFlux utility with sonicFoam | hiuluom | OpenFOAM Post-Processing | 3 | September 18, 2015 07:39 |
Something doens't work with wallHeatFlux utility or externalWallHeatFluxTemperat BC!! | zfaraday | OpenFOAM Post-Processing | 0 | February 5, 2015 16:47 |
Local heat transfer / modifying wallHeatFlux | buck_s | OpenFOAM Programming & Development | 0 | June 17, 2014 06:54 |
Local heat transfer / modifying wallHeatFlux | buck_s | OpenFOAM Post-Processing | 0 | June 17, 2014 06:52 |
wallHeatFlux utility in OpenFoam1.6 | maruthamuthu_venkatraman | OpenFOAM | 29 | October 3, 2011 10:43 |