|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Snehal Janwe
Join Date: May 2010
Location: Stuttgart
Posts: 10
Rep Power: 5 ![]() |
Hello everybody,
I have successfully simulated the case of flow around a circular cylinder with heat transfer using OpenFOAM. For heat transfer I have calculated the nusselt number over the cylinder surface. I just wanted to know, how can I plot Nusselt number over theta(angle 0-360). Thanks in advance |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 104
Rep Power: 4 ![]() |
use paraFoam to do that
extract your cylinder boundary with extractBlock plot on intersection and select appropriate axis (z?) select variables... Is your cylinder fully rough? |
|
|
|
|
|
|
|
|
#3 |
|
Member
Maryam Mousazadeh
Join Date: Oct 2010
Posts: 47
Rep Power: 4 ![]() |
hello ;
I added energy equation to simplefoam and simulated heat transfer around a cube but I don't know how to calculate nusselt number and plot it.all walls of the cube are under constant heat flux. would you help me? ![]() thanks. |
|
|
|
|
|
|
|
|
#4 | |
|
Senior Member
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 104
Rep Power: 4 ![]() |
Quote:
See the tool, Code:
wallHeatFlux Let me know if you have difficulties. regards, aeroThermal |
||
|
|
|
||
|
|
|
#5 |
|
Member
Maryam Mousazadeh
Join Date: Oct 2010
Posts: 47
Rep Power: 4 ![]() |
thanks, do you mean wallHeatFluxLaminar utility?but it calculates wall heat flux which is my input data as boundary conditions and I don't need it.I think I need termal gradient to calculate h=q''/(Ts-T∞) >> Nu=hL/k. but I don't know how!!!
|
|
|
|
|
|
|
|
|
#6 |
|
Senior Member
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 104
Rep Power: 4 ![]() |
yes...of course you have the heat flux!
so it is simpler! do it in paraFoam... 1) extract your cylinder boundary with extractBlock 2) use calculator to evaluate \dot{q}^" / (DeltaT) 3) plot on intersection and select appropriate axis (z?) 4) select variables... Regards, aerothermal |
|
|
|
|
|
|
|
|
#7 |
|
Member
Maryam Mousazadeh
Join Date: Oct 2010
Posts: 47
Rep Power: 4 ![]() |
hello.
thanks a lot . but my problem is that I don't know how to calculate DeltaT. |
|
|
|
|
|
|
|
|
#8 |
|
Senior Member
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 104
Rep Power: 4 ![]() |
You can calculate that in paraFoam. Use Filter -> Calculator.
So it is possible to calculate (T-Tref) on it to generate a new field. In order to get only T surface you will need to Filter -> ExtractBlock your patch. |
|
|
|
|
|
|
|
|
#9 |
|
Member
Maryam Mousazadeh
Join Date: Oct 2010
Posts: 47
Rep Power: 4 ![]() |
I'm sorry, it was so easy.thanks a lot for your helping.
![]() excuse me, can we export the result of caculating to matlab or save the data in a separate file?(I'm not well in paraview) thanks kind regards |
|
|
|
|
|
|
|
|
#10 |
|
Senior Member
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 104
Rep Power: 4 ![]() |
yes...just select your plot, click file -> save data.
it will save as .csv for external tools like excel, matlab or R Cran |
|
|
|
|
|
|
|
|
#11 |
|
Member
Maryam Mousazadeh
Join Date: Oct 2010
Posts: 47
Rep Power: 4 ![]() |
thank a lot for your guidance.
regards. |
|
|
|
|
|
|
|
|
#12 |
|
Member
Maryam Mousazadeh
Join Date: Oct 2010
Posts: 47
Rep Power: 4 ![]() |
hello dear aerothermal;
excuse me, I have another problem with heat transfer in openfoam. I want to simulate an incompressible nanofluid flow with heat transfer using simpleFoam (i.e. solver includes an energy equation).The conductivity of the fluid is temperature dependent . I don't know haw can modify the solver and case directories to these properties become temperature dependent ;I took down this threat in this site but I have not received any answer so far,would you help me ?I attach special formula of nonofluids: formuls.zip kind regards |
|
|
|
|
|
|
|
|
#13 |
|
Senior Member
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 104
Rep Power: 4 ![]() |
Dear Maryam,
your zip file is empty. Regards, aerothermal |
|
|
|
|
|
|
|
|
#14 |
|
Member
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 91
Rep Power: 3 ![]() |
dear friends,
I have calculated the local Nusselt number. Please see the code. How I will calculate the average Nusselt Number? #include "fvCFD.H" #include "hCombustionThermo.H" #include "basicThermo.H" #include "RASModel.H" #include "wallFvPatch.H" int main(int argc, char *argv[]) { timeSelector::addOptions(); #include "setRootCase.H" #include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); #include "createMesh.H" forAll(timeDirs, timeI) { runTime.setTime(timeDirs[timeI], timeI); Info<< "Time = " << runTime.timeName() << endl; mesh.readUpdate(); #include "createFields.H" #include "readRefValues.H" surfaceScalarField heatFlux ( fvc::interpolate(RASModel->alphaEff())*fvc::snGrad(h) ); const surfaceScalarField::GeometricBoundaryField& patchHeatFlux = heatFlux.boundaryField(); Info<< "\nWall heat fluxes [W]" << endl; forAll(patchHeatFlux, patchi) { if (typeid(mesh.boundary()[patchi]) == typeid(wallFvPatch)) { Info<< mesh.boundary()[patchi].name() << " " << sum ( mesh.magSf().boundaryField()[patchi] *patchHeatFlux[patchi] ) << endl; } } Info<< endl; volScalarField wallHeatFlux ( IOobject ( "wallHeatFlux", runTime.timeName(), mesh ), mesh, dimensionedScalar("wallHeatFlux", heatFlux.dimensions(), 0.0) ); forAll(wallHeatFlux.boundaryField(), patchi) { wallHeatFlux.boundaryField()[patchi] = patchHeatFlux[patchi]; } wallHeatFlux.write(); Info << "\nNusselt Number:" << endl; volScalarField localNusselt ( IOobject ( "localNusselt", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("localNusselt",dimless,0.0) ); forAll(localNusselt.boundaryField(),patchi) { localNusselt.boundaryField()[patchi] = length*patchHeatFlux[patchi]/((T_hot-T_ini)*k); } localNusselt.write(); } Info<< "End" << endl; return 0; } Last edited by Goutam; March 4, 2012 at 08:18. |
|
|
|
|
|
|
|
|
#15 |
|
Senior Member
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 104
Rep Power: 4 ![]() |
Two ways:
1) in your code, sum all your Nusselt number values for one patch (not all patches) times de area of each element; sum all areas of elements/cells of the same patch; divide the nusselt values sum by the area sum 2) in paraFoam, use filter "extractBlock" to extract the patch you want the average, use filter "integrate variables", it will open an spreadsheet, look for Area value in Cells or Points, look for Nusselt value in Cells or Points, divide Nusselt integrated value by the Area integrated value. Regards, aerothermal |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mesh Refinement | Luiz Eduardo Bittencourt Sampaio (Sampaio) | OpenFOAM Mesh Utilities | 41 | January 17, 2013 02:43 |
| DecomposePar unequal number of shared faces | maka | OpenFOAM Pre-Processing | 6 | August 12, 2010 09:01 |
| BlockMeshmergePatchPairs | hjasak | OpenFOAM Native Meshers: blockMesh | 11 | August 15, 2008 07:36 |
| Unaligned accesses on IA64 | andre | OpenFOAM | 5 | June 23, 2008 10:37 |
| Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... | 2 | July 15, 2005 04:15 |