|
[Sponsors] |
January 13, 2014, 06:11 |
Problem with snGrad() for heat flux.
|
#1 |
New Member
Lee
Join Date: Oct 2011
Posts: 15
Rep Power: 15 |
I am simulating the gas laminar flow in straight rectangular channel with rhoCentralFoam (OF-2.2.2), I modified the utility wallHeatFlux and also renamed it to extract the heat flux for laminar flow, and get problem with snGrad() that was used to compute the normal gradient of temperature.
In the code I set surfaceScalarField heatFlux = (fvc::interpolate(-k))*(fvc::snGrad(T)); then I compile my utility and run it and get the heat fluxes at the surfaces and outlet are zero while it can produce the heat flux at inlet only. I just check heatFlux = fvc::interpolate(-k) so I have all values (not zero) of k at the surfaces but it I added (fvc::snGrad(T)) to heatFlux I got the results are zero for surface heat flux. This means (fvc::snGrad(T)) produced the value of zero for normal gradient temperature. What problem I get with snGrad() function. Can anyone help me to get the heat fluxes at the surfaces ? I use psiThemo model in simulation. |
|
February 16, 2014, 14:01 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Lee,
I honestly don't know what is the problem you're getting, because I don't get any problem. I'm guessing this is because you didn't share enough information for reproducing the same problem. I modified the wallHeatFlux utility this way:
Bruno
__________________
|
|
February 24, 2014, 10:09 |
|
#3 |
New Member
Lee
Join Date: Oct 2011
Posts: 15
Rep Power: 15 |
Hi Bruno,
I modified the wallHeatFLux for laminar case with the rhoCentralFoam solver. in CreateFields.H Code:
autoPtr<psiThermo> pThermo ( psiThermo::New(mesh) ); psiThermo& thermo = pThermo(); volScalarField Cp ( IOobject ( "Cp", runTime.timeName(), mesh ), thermo.Cp() ); volScalarField mu ( IOobject ( "mu", runTime.timeName(), mesh ), thermo.mu() ); Code:
volScalarField T ( IOobject ( "T", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ), mesh ); surfaceScalarField heatFlux ( fvc::interpolate ( ( mu*Cp/0.72 // Pr = 0.72 ) )*fvc::snGrad(T) ); Could you help me to find out the mistakes ? Thanks Best regards, SK Last edited by wyldckat; March 2, 2014 at 08:20. Reason: Added [CODE][/CODE] |
|
March 2, 2014, 08:40 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Lee,
This is the problem when people don't share a test case The utility will work if you have walls in your simulation case. Check the contents of the file "constant/polyMesh/boundary". If all patches are of type "patch" or if none of the patches are of type wall, then it's only natural that you don't have non-zero values near the walls that don't exist For example, if you run this command in the tutorial case "compressible/rhoCentralFoam/biconic25-55Run35", after the mesh has been created: Code:
patchSummary -constant -noZero Code:
Valid fields: patch : cone patch : outlet patch : freestream group : symmetryPlane group : wedge End Best regards, Bruno
__________________
|
|
March 4, 2014, 23:46 |
|
#5 |
New Member
Lee
Join Date: Oct 2011
Posts: 15
Rep Power: 15 |
Hi Bruno,
That's fine. It works. Thanks so much for your help. SK |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Solution of SOD Shock Tube Problem by using HARTEN Modified Flux TVD Scheme | xue sheng | Main CFD Forum | 5 | August 27, 2022 08:06 |
Mesh UDF problem | kornetka | Fluent UDF and Scheme Programming | 4 | July 25, 2013 07:54 |
Problem setting with chtmultiregionFoam | Antonin | OpenFOAM | 10 | April 24, 2012 10:50 |
Problem with Sngrad() operator | skabilan | OpenFOAM Bugs | 6 | March 24, 2009 20:00 |
What is the problem with the relative Flux Correction | danielle | OpenFOAM Running, Solving & CFD | 0 | November 2, 2008 00:24 |