|
[Sponsors] |
TEqn (passive scalar) diverges all of a sudden |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 14, 2018, 08:34 |
TEqn (passive scalar) diverges all of a sudden
|
#1 |
Member
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10 |
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? |
|
October 14, 2018, 09:04 |
|
#2 |
Senior Member
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12 |
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? |
|
October 14, 2018, 19:31 |
|
#3 | |
Member
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10 |
Quote:
No, every other field is converging very well. U, p, and turbulence related fields are all okay.. |
||
October 14, 2018, 22:23 |
|
#4 |
Senior Member
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12 |
Are you saving every timestep before it goes crazy so you can have a close look?
|
|
October 16, 2018, 06:11 |
|
#5 | |
Member
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10 |
Quote:
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.. |
||
October 16, 2018, 07:48 |
|
#6 |
Senior Member
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12 |
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 |
|
October 17, 2018, 06:24 |
|
#7 | |
Member
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10 |
Quote:
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. |
||
October 18, 2018, 10:03 |
|
#8 |
Senior Member
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12 |
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?
|
|
October 18, 2018, 14:08 |
|
#9 | |
Member
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10 |
Quote:
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, Last edited by backscatter; October 18, 2018 at 15:18. |
||
October 20, 2018, 21:04 |
|
#10 |
Member
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10 |
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.
|
|
October 21, 2018, 01:48 |
|
#11 |
Senior Member
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 12 |
So, could we say the issue was too high aspect ratio outside of boundary layer?
|
|
October 21, 2018, 08:56 |
|
#12 |
Member
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10 |
||
|
|
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 |