CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

TEqn (passive scalar) diverges all of a sudden

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By backscatter
  • 1 Post By pete20r2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2018, 08:34
Default TEqn (passive scalar) diverges all of a sudden
  #1
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
Hi,

I've added a TEqn to pimpleFoam to model the passive scalar transport. My case is a simple channel with a rib situated at its center. The b.c's for T are a uniform flux on the bottom surface of the channel and the rib surface. Also, I've added a buffer cell zone near the inlet to make the incoming T uniform (as I recycle T). This buffer cellzone forces the incoming T explicitly to some specific value which I can set using fvOptions. This has worked before.
But as I run the case on coarser meshes, the simulation runs without any issues. As I use a finer mesh near the walls, the case still runs smoothly and the T residuals converge very well. All of a.sudden, then issue I face is that after a long time (1 to 1.5 flow passes), the TEqn blows up. I've tried changing the linear solver for T, the div schemes etc but got no real solution. These did affect it in the sense that it took longer to crash now. Reducing time step also helps but I don't want to make it extremely small. Also I tried implicitly relaxing TEqn, it also kind of stabilized it, as in now it took longer time to crash as the residuals took much longer time to diverge.
Can anyone help me in figuring out what i might be missing?
backscatter is offline   Reply With Quote

Old   October 14, 2018, 09:04
Default
  #2
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12
pete20r2 is on a distinguished road
Have you tried the limitTemperature fvOptions to get you going?
Are you running limited div and grad schemes?
Do any of the other fields (namely U) explode too?
pete20r2 is offline   Reply With Quote

Old   October 14, 2018, 19:31
Default
  #3
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
Quote:
Originally Posted by pete20r2 View Post
Have you tried the limitTemperature fvOptions to get you going?
Are you running limited div and grad schemes?
Do any of the other fields (namely U) explode too?
Yes, I tried it today, didn't work, same problem. Right now I am not using limited div and grad schemes for T. I have used these in past, they didn't help. I'll try them again.
No, every other field is converging very well. U, p, and turbulence related fields are all okay..
backscatter is offline   Reply With Quote

Old   October 14, 2018, 22:23
Default
  #4
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12
pete20r2 is on a distinguished road
Are you saving every timestep before it goes crazy so you can have a close look?
pete20r2 is offline   Reply With Quote

Old   October 16, 2018, 06:11
Default
  #5
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
Quote:
Originally Posted by pete20r2 View Post
Are you saving every timestep before it goes crazy so you can have a close look?
First of all, thanks for all the help. I really appreciate it.
Today, I wrote the results at each timestep and it seems it blows up half the rib height above the rib on its rear side. I am really confused as to what might be causing it when it runs perfectly for one flow pass, sometimes... One thing I noticed is that at the location where it starts to blow up, the cells are clustered so closely in the streamwise direction.. it might be the mesh which is causing it..
backscatter is offline   Reply With Quote

Old   October 16, 2018, 07:48
Default
  #6
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12
pete20r2 is on a distinguished road
Maybe it's just me but I am having a hard time visualising your geometry. Is it possible to share you case (if it's not secret), I have a little spare time tonight. If not, at least a diagram of the problem, boundary conditions and a close up of the mesh around the problem area would be useful.
Bad mesh is always the first thing to check
pete20r2 is offline   Reply With Quote

Old   October 17, 2018, 06:24
Default
  #7
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
Quote:
Originally Posted by pete20r2 View Post
Maybe it's just me but I am having a hard time visualising your geometry. Is it possible to share you case (if it's not secret), I have a little spare time tonight. If not, at least a diagram of the problem, boundary conditions and a close up of the mesh around the problem area would be useful.
Bad mesh is always the first thing to check
HI Peter,

Sorry for late response. I was busy with some other stuff during the whole day. Now, I have got some time to respond. I am attaching a link to my case that I ran with bounded schemes. Specifically I have used:
div(phi,T) bounded Gauss QUICK;
div(phiT,alphaEff) bounded Gauss linear;

for grad schemes:
grad(T) cellLimited Gauss linear 1;
and ddt(T) bounded Euler; for time derivative.

The problem still persists. Though I have not tried LimitedLinear or LimitedUpwind yet.
Please take a look at the case, If you get time.

https://drive.google.com/drive/folde...Qvg8wwzAAX9V_g

The T begins to blow up at the times present inside the case directory.
Thanks again for all the help.
backscatter is offline   Reply With Quote

Old   October 18, 2018, 10:03
Default
  #8
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12
pete20r2 is on a distinguished road
I'm looking at this now, is your solver and also turbulence model custom? I'm using 1806 but I also have extend 4.0 installed. I can get the job running by changing the turbulence model to something included in my distro (kOmega or SST variant) and using a passiveScalar solver function object for T and a MeanVelocityForce to drive the flow. I diverge in 2 time steps but that is due to the turbulence model blowing up. Could you provide the 0 folder and the turbulence model or equivalent model in 1806?
pete20r2 is offline   Reply With Quote

Old   October 18, 2018, 14:08
Default
  #9
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
Quote:
Originally Posted by pete20r2 View Post
I'm looking at this now, is your solver and also turbulence model custom? I'm using 1806 but I also have extend 4.0 installed. I can get the job running by changing the turbulence model to something included in my distro (kOmega or SST variant) and using a passiveScalar solver function object for T and a MeanVelocityForce to drive the flow. I diverge in 2 time steps but that is due to the turbulence model blowing up. Could you provide the 0 folder and the turbulence model or equivalent model in 1806?

Hi,
I have uploaded a kOmega passive scalar variant turbulence model and a custom solver to the shared folder. Please note that "lib_kOmegaPasiveScalar_incompressibleRASModels.so " needs to be added to controlDict and in RASProperties you might have to change RAS Model to kOmegaPassiveScalar;
I believe this turbulence model will work. The model that I have actually used is a DES formulation which I am unsure if I can share or not.
For the solver, pimpleScalarBulkTempFoam is the executable. It has a source term as you can see which maintains the bulk temp inside the channel. I have also uploaded the 0/ folder
If the model or solver fall short anywhere, plz let me know.

PS: I tried running the case with TEqn relaxed by a factor of 0.3, still then it resulted in a crash. As far as I have observed, it is the mesh which is creating the issues. If you take a look at the attached pictures, you can easily see the troubled region where the T starts to blow up is the row of very fine cells emerging from top of the rib. I wonder if I might have to not use this mesh.
See the attached pictures. One is zoomed view of the trouble region and the other is slice of whole domain through that region where the troubled region is circled in red.



Thanks,
Attached Images
File Type: png slice.png (16.7 KB, 60 views)
File Type: png zoomed_in.png (8.0 KB, 43 views)

Last edited by backscatter; October 18, 2018 at 15:18.
backscatter is offline   Reply With Quote

Old   October 20, 2018, 21:04
Default
  #10
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
I changed my mesh from cartesian to O-grid type to get rid of the thin cells away from the rib where T blew up. That solved the problem.
hogsonik and vivek05 like this.
backscatter is offline   Reply With Quote

Old   October 21, 2018, 01:48
Default
  #11
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12
pete20r2 is on a distinguished road
So, could we say the issue was too high aspect ratio outside of boundary layer?
hogsonik likes this.
pete20r2 is offline   Reply With Quote

Old   October 21, 2018, 08:56
Default
  #12
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
Quote:
Originally Posted by pete20r2 View Post
So, could we say the issue was too high aspect ratio outside of boundary layer?
Absolutely!
backscatter is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 05:18
Division by zero exception - loop over scalarField Pat84 OpenFOAM Programming & Development 6 February 18, 2017 06:57
Issue symmetryPlane 2.5d extruded airfoil simulation 281419 OpenFOAM Running, Solving & CFD 5 November 28, 2015 14:09
Diverging solution in transonicMRFDyMFoam tsalter OpenFOAM Running, Solving & CFD 30 July 7, 2014 07:20
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 02:47


All times are GMT -4. The time now is 18:06.