|
[Sponsors] |
April 6, 2016, 12:03 |
Courant Number Shoot up!
|
#1 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
I am trying to run a simulation using BuoyantBoussinesqPimpleFOAM.
I have re-modified the solver as a laminar transient one. In the control dict even though i have specifed maxCo has 0.5, during simulation the max courant number reaches values in the range10k-100k+ and still the simulation keeps on running. Mean courant number also varies from 0.001 to 100+ ranges. i have chosen the deltat based on the formuale (i.e. velocity/smallest cell in domain) and i am sure my mesh is a very good mesh. But ANyone know why this happens??? Any idea?? |
|
April 16, 2016, 12:22 |
|
#2 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick question: Which OpenFOAM version are you using?
Quick answers: Quote:
Quote:
In addition, if you indeed have modified the solver, then you might have broken how it adapts the time step.
__________________
|
|||
April 17, 2016, 00:13 |
Thank you for the reply
|
#3 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
Hi Bruno,
I am glad you happen to read my post Yeah i initially, switched off RAS to laminar in the 'turbulenceProperties' in the constant directoary. But Still it kept on asking to read the values of alphat, k, epsilon etc which is not needed as iam trying to simulate a laminar solver. So i took out, the RAS and turbulence.H files from my .C file and also from my files/options in the solver and re-complied it. Just to keep away all the unwanted aspects of turbulence in the solver. (pratically it wasnt needed but i just tried ) I would post the controlDict file here: Code:
libs ( "libOpenFOAM.so" "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" "libgroovyBC.so" ); application Foam; startFrom startTime; startTime 0; stopAt endTime; endTime 1800; deltaT 1; writeControl timeStep; writeInterval 150; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; adjustTimeStep no; maxCo 0.5; But the results i get are somewhat in accordance with the physics of the problem. I am trying to simulate natural convection (thermosyphon effect) on tubes. In the base solver the UEqn.H is given as: Code:
fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U) == fvOptions(U) ); UEqn.relax(); fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { solve ( UEqn == fvc::reconstruct ( ( - ghf*fvc::snGrad(rhok) - fvc::snGrad(p_rgh) )*mesh.magSf() ) ); fvOptions.correct(U); } Code:
// Solve the momentum equation fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) -fvm::laplacian(nu, U) ); UEqn.relax(); UEqn.solve(); Any Suggestions Sir Last edited by wyldckat; April 17, 2016 at 14:00. Reason: Added [CODE][/CODE] markers |
|
April 17, 2016, 14:20 |
|
#4 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick answers:
Quote:
And I'm glad I asked for the "controlDict", because these 3 entries: should be changed to something like this:
Looks OK to me. Although keep in mind that this way you can't use source terms defined with "fvOptions" for the U field. |
||
April 17, 2016, 14:25 |
Big Thank you Bruno :)
|
#5 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
I was waiting even if its late at nite here f or your post Glad that u read my post am a slow learner thanks for the help
Indeed yeah, I cant use my source term using fvOptions by this way. But i guess i dont need it for my problem. It seems like that. I would check with the controlDict file and let u know, what happened And about RAS properties file inside the constant directory, i removed it as i have removed RAS Header files frm .C |
|
May 15, 2016, 11:00 |
Hope you had a safe journey :) Bruno (Y)
|
#7 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
Hi All,
In my problem as stated above, i am using fixedGradient to apply a uniform heat flux boundary condition on walls. Suppose I want to apply heat flux condition on the surface of a tube through which water is flowing. since i want to apply different heat flux at the top side and bottom side of the top i have written a boundary condition like topside { type fixedGradient; gradient uniform 1321.549; } bottomside { type fixedGradient; gradient uniform 320.145; } And I have set the internalfield of Temperature field to be at room temperature i.e. 298K. But when i run the simulation, the temperature on the bottom walls falls below 298K or even goes like 180K even. The temperature Equation is fvScalarMatrix TEqn ( fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(KcEff, T) ); TEqn.relax(); TEqn.solve(); where KcEff is a dimensioned Scalar for time being. any suggestions? |
|
June 3, 2016, 02:00 |
I solved it
|
#8 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
It was an error occurring due to some mistake in m pressure boundary conditions.
It works now. |
|
June 5, 2016, 23:16 |
|
#9 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
I am trying to simulate a problem similar to water flowing through a glass tube. The glass tube is provided with constant heat flux and i am using boussinesq approximation to model the natural convection taking place within the tube. The base solver i am using is buoyantBoussinesqPimpleFOAM.
The problem is transient, laminar, incompressible. I kind of modeled the problem. But i have some doubts regarding this issue. To apply a constant heat flux condition on tube walls i have used a fixedGradient Boundary condition on 0/T As we know that Q/A (heat flux) = -k* dt/dx, where k is thermal conductivity of glass Now i assume that, the water intakes the heat applied on tube walls by convection. therefore Q/A = h* (T - Tinf) If this formulation is right. I want to find out the (T-Tinf). But as i dont know much about OpenFOAM, i dont know how to compute it. I want to calculate this in every cell of the domain. Why i need (T-Tinf)? Suppose if i want to calculate the grashoffno from this solver in post processing stage. I can write the grashoff nio equation and it contains this term (T-Tinf). By finding it, i can find out grashoff no also. is it correct? If my theory is wrong, please correct me. How can i compute that (T-Tinf) from my solver? Looking forward for your help. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops | avinashjagdale | OpenFOAM Meshing & Mesh Conversion | 53 | March 8, 2019 09:42 |
Sudden jump in Courant number | NJG | OpenFOAM Running, Solving & CFD | 7 | May 15, 2014 13:52 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 02:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |