|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 13 ![]() |
Hi everyone
I want to get normal gradient of temperature at wall boundary in laminar incompressible flow.I've modified wallGradU utility as someone in other posts said. I want to know why wallGradT remains fixed in some cells?and how I can make it correct? my geometry is pipe with 1 meter length and 0.003 meter radius and the blockMeshDict is like: Code:
convertToMeters 1; vertices ( (0 0 0) //0 (0 0 0.001) (0 0.001 0.001) //2 (0 0.001 0) (0 0 0.003) //4 (0 0.0021213 0.0021213) (0 0.003 0 ) //6 (1 0 0) //7 (1 0 0.001) (1 0.001 0.001) //9 (1 0.001 0) (1 0 0.003) //11 (1 0.0021213 0.0021213) (1 0.003 0 ) //13 ); blocks ( // inlet block hex (7 8 9 10 0 1 2 3) (9 9 300) simpleGrading (1 1 1) hex (8 11 12 9 1 4 5 2) (51 9 300) simpleGrading (0.03075 1 1) hex (10 9 12 13 3 2 5 6) (9 51 300) simpleGrading (1 0.03075 1) ); edges ( arc 4 5 (0 0.001148 0.00277) arc 5 6 (0 0.00277 0.001148) arc 11 12 (1 0.001148 0.00277) arc 12 13 (1 0.00277 0.001148) ); boundary ( inlet { type patch; faces ( (0 1 2 3) (1 4 5 2) (2 5 6 3) ); } outlet { type patch; faces ( (7 10 9 8) (8 9 12 11) (9 10 13 12) ); } side1 { type symmetryPlane; neighbourPatch side2; faces ( (0 7 8 1) (1 8 11 4) ); transform rotational; rotationAxis (1 0 0); rotationCentre (0 0 0); } side2 { type symmetryPlane; neighbourPatch side1; faces ( (0 3 10 7) (3 6 13 10) ); transform rotational; rotationAxis (1 0 0); rotationCentre (0 0 0); } walls { type wall; faces ( (4 11 12 5) (5 12 13 6) ); } ); Code:
dimensions [0 0 0 1 0 0 0]; internalField uniform 293; boundaryField { inlet { type fixedValue; value uniform 293; } outlet { type zeroGradient; } walls { type fixedValue; value uniform 373; } side2 { type symmetryPlane; } side1 { type symmetryPlane; } } Code:
ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; div((nuEff*dev(T(grad(U))))) Gauss linear; div(phi,T) Gauss linear; } laplacianSchemes { default none; laplacian(nuEff,U) Gauss linear corrected; laplacian((1|A(U)),p) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; laplacian(alpha,T) Gauss linear corrected; laplacian(1,p) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default Uncorrected; } fluxRequired { default no; p ; } // ************************************************************************* // can any body help me? thanks. arjang Last edited by AmirBaqa1987; December 10, 2013 at 06:10. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 13 ![]() |
Nobody can help?
![]() |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Greetings Arjang,
Well, knowing which posts you are referring to would help, in order to assess if something might have gone wrong. In addition, knowing the "U" and "p" boundary conditions would also help, as well as knowing which solver you have used and if has converged. And a picture of what your are seeing in ParaView would also help. Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#4 | |
Member
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 13 ![]() |
Quote:
thanks for your attention. I'm want help about wallGradT. Nu = wallGradT*D/(Twall - Tbulk) for calculating Nusselt number I've calculated bulk Temperature and also normal gradient of temperature at wall boundary. as you can see in the attached file,the amount of wallGradT in some cells remains fixed but the amount of Tbulk has increased continuously and this fact caused the Nusselt diagram to have oscillation.(please look at attached files) but It must not have this behaviour. I've used newSimpleFoam solver which I've added energy equation to. and the solution has converged( but the manner of convergence of T equation is not good,I mean the initial residuals of T did not constantly decrease). TEqn: Code:
fvScalarMatrix TEqn ( fvm::div(phi,T) -fvm::laplacian(alpha,T) ); TEqn.solve(); Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type fixedValue; value uniform (0.10088 0 0); } outlet { type zeroGradient; } side1 { type symmetryPlane; } side2 { type symmetryPlane; } walls { type fixedValue; value uniform (0 0 0); } } Code:
dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; } walls { type zeroGradient; } side2 { type symmetryPlane; } side1 { type symmetryPlane; } } sincerely yours, Arjang wallGradT&Tbulk.xls Nu.jpg |
||
![]() |
![]() |
![]() |
![]() |
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Arjang,
Is there any chance you can share the complete case, instead of only parts of it? I ask this because at least the following information is still missing:
![]() Because right now, my guess is that this is a sampling problem (insufficient data points or wrongly located points), or the case is incorrectly prepared. Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 13 ![]() |
Hi Dear Bruno
yes why not ![]() and I've developed solver like below: createFields Code:
Info<< "Reading transportProperties\n" << endl; IOdictionary transportProperties ( IOobject ( "transportProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); Info<< "Reading field p\n" << endl; volScalarField p ( IOobject ( "p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); Info<< "Reading field U\n" << endl; volVectorField U ( IOobject ( "U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); Info<< "Reading field T\n" << endl; volScalarField T ( IOobject ( "T", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); dimensionedScalar nu ( transportProperties.lookup("nu") ); dimensionedScalar rho ( transportProperties.lookup("rho") ); dimensionedScalar c ( transportProperties.lookup("c") ); dimensionedScalar alpha ( transportProperties.lookup("alpha") ); dimensionedScalar k ( transportProperties.lookup("k") ); #include "createPhi.H" label pRefCell = 0; scalar pRefValue = 0.0; setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); singlePhaseTransportModel laminarTransport(U, phi); autoPtr<incompressible::RASModel> turbulence ( incompressible::RASModel::New(U, phi, laminarTransport) ); IObasicSourceList sources(mesh); Code:
fvScalarMatrix TEqn ( (fvm::div(phi,T) -fvm::Sp(fvc::div(phi),T)) -fvm::laplacian(alpha,T) ); TEqn.solve(); Code:
int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" #include "createFields.H" #include "initContinuityErrs.H" simpleControl simple(mesh); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (simple.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; // --- Pressure-velocity SIMPLE corrector { #include "UEqn.H" #include "pEqn.H" #include "TEqn.H" } turbulence->correct(); runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; return 0; } Code:
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; IOobject Theader ( "T", runTime.timeName(), mesh, IOobject::MUST_READ ); // Check T exists if (Theader.headerOk()) { mesh.readUpdate(); Info<< " Reading T" << endl; volScalarField T(Theader, mesh); Info<< " Calculating wallGradT" << endl; volScalarField wallGradT ( IOobject ( "wallGradT", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar ( "wallGradT", T.dimensions()/dimLength, 0 ) ); forAll(wallGradT.boundaryField(), patchi) { wallGradT.boundaryField()[patchi] = mag(T.boundaryField()[patchi].snGrad()); } wallGradT.write(); } else { Info<< " No T" << endl; } } Info<< "End" << endl; return 0; } - I've plot these data over line in paraFoam with following coordination: point1: (0 0 0.003) point2: (1 0 0.003) and the resolution is 100 (this cause 101 points being plotted). Thanks Best Regards. Last edited by AmirBaqa1987; December 16, 2013 at 05:33. |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 51 ![]() ![]() ![]() |
Hello Arjang,
just a few question and hints.
Code:
fvScalarMatrix TEqn ( (fvm::div(phi,T) -fvm::Sp(fvc::div(phi),T)) // Red brackets can be removed -fvm::laplacian(alpha,T) ); TEqn.solve(); TEqn.relax(); // therefor your Relaxation factor is used 5. As you mentioned that your case has no smooth convergence for T i think this is a manner of the not used underrelaxation in your equation. Code:
{ p 1e-2; // 1e-5 U 1e-3; // 1e-6 T 1e-3; // 1e-6 } I think if you Change your solvers and add the Relaxation to your TEqn you will get accurate and better results. Try it and let us know. Regards Tobi |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 13 ![]() |
Hi Tobias
thanks for your Tips. I did your suggestions I mean: 1.using PBiCG instead of BICCG for T. 2.adding TEqn.relax(); inTEqn.H now the convergence of T is smooth ![]() ![]() Danke Schon . Arjang |
|
![]() |
![]() |
![]() |
![]() |
#9 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 51 ![]() ![]() ![]() |
Quote:
Hi, did you check the hints Bruno mentioned? At the moment it seems that it is a sampling Problem like he said. Additionally. Check the regions with These "Nu" oscillations. I think Bruno is telling you the correct Problem because if you interpolate the massflow of an inlet and outlet you will not get the same values (Interpolation Problem with paraview). Regards Tobi |
||
![]() |
![]() |
![]() |
Tags |
eshdict |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 04:43 |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 05:59 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 06:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 14:52 |