|
[Sponsors] |
cyclic bc in cases where, there is periodicity in geometry but not in flow |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 14, 2022, 10:55 |
cyclic bc in cases where, there is periodicity in geometry but not in flow
|
#1 |
Senior Member
Join Date: Jun 2020
Posts: 100
Rep Power: 6 |
Hello Foamers
I want to simulate a turbulent flow in a symmetrical step case (see attched image). Both the inlet channel and oulet channel have exact same height and width, i.e. one to one mapping is possible, thus geometry is periodic. However, there is a symetrical step between inlet and outlet channel, where flow seperation and reattachment may occure. I am not sure but i think in this case, the flow at the outlet can not be cycled to inlet as they seem to be non-periodic in flow. I tried to use cyclic bc at inlet and oulet and used fvOption to provide the mean flow velocity. But, somehow simulations gets killed. I tried to use different fvSchemes an fvsolutions methods but no access. Each time, the simulation gets killed either due to floating point exception error or convergence problem even after 1000 iterations. I think, this happens, because I am trying to use cyclic bc where physically it it not periodic. Am i right? Best Regards Atul |
|
January 14, 2022, 14:19 |
|
#2 |
Senior Member
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9 |
Cyclic BC will only copy what happens at one BC to the other. It does not do any physical check; I don't believe you are diverging because of that.
To understand periodic (i.e. cyclic) BC, imagine that you have inifinite instances of your domain, attached inlet<->outlet. So what happens in the outlet must be exactly what happens in the inlet. Is that what you want? Cyclic BCs are not that easy to make stable. Try running your case with regular inlet/outlet bcs to get the flow resolved, then map that as initial condition to a new case with cyclic bc |
|
January 15, 2022, 09:09 |
|
#3 | ||
Senior Member
Join Date: Jun 2020
Posts: 100
Rep Power: 6 |
Hello Julio
Thanks for your valuable comments. Quote:
Quote:
Thanks and Best Regards Atul Jaiswal |
|||
January 17, 2022, 11:23 |
|
#4 |
Senior Member
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9 |
Hi! Well you are right about the cyclic BC only being possible when the flow doesn't change from outlet to inlet, but it can change in the middle. When you apply the BC you're telling the solver "give me the condition that satisfies that", so it will find a solution that guarantee inlet=outlet. Even if for that the profile is funky and weird.
Have you tried running it in transient and see how the solver is evolving? Physically, I imagine that the velocity profile will be intense near the top wall and possibly back-flowing near the bottom of the patch. That could make a phisically demandind setup to converge, but it should find a solution. Share your case, as simple as it can be, and I'll have a look and try to help. |
|
January 17, 2022, 12:43 |
|
#5 |
Senior Member
Join Date: Jun 2020
Posts: 100
Rep Power: 6 |
Dear Julio
Actually, i managed to run the case without fatar error/covergence problem. But the profiles I am getting change a bit in the flow direction (reduction in peak). As far I understand, the flow profile should remain same as you move in longitudenal direction, then only it is fully developed flow. Actually, the original case is multiphase case, which i am simulating by coupling openfoam and liggghts. Here, I am attaching only the CFD part (openfoam), so that you dont have to give extra effort and donot need extra coupling code. It has some extra files that you can simply ignore. While attaching the zipped file the portal shows invalid file. In case it is not uploaded, you can give me your email in private chat, i will mail you the setup. Thanks and best Regards Atul |
|
January 18, 2022, 10:27 |
|
#6 |
Senior Member
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9 |
So, I got your case, thanks! I have some things to suggest.
1) Your snappyHexed mesh does not have surfaceFeatures on, that's why you're getting these chamfered corners. If this is your final mesh, it's pretty simple and faster to run when created in blockMesh. I can help you with that if you need. 2) The best way to create cyclic BC is by running createPatch after the mesh is done. From the files you shared, it seems you have manually edited /constant/boundary file, right? Try using createPatch -overwrite instead. Also, remember that you shouldn't create cyclic BCs from blockMesh nor snappyHex. 3) I ran the case until 0.01s and the results didn't seem to change - it converged. The profile is quite as I'd expect. You flow will change in longitudinal (flow) direction as you have the cavity (bottom part of your domain). The profile will then reshape itself to match the inlet-cycled condition. Remember, with cyclic you are simulating an infinite number of cavities like these, as if there were several connected "T"s. Like [...]->TTTTTTTTTTTTT->[...] entering from top line of the letter "T". A fully developed flow will not change in time, i.e. every cross-section of your domain will have the same velocity profile at every time, but not necessarily will have the same profile between them. 4) I also noticed that your top BC is allowing slip for some reason. You have U_X velocity on it. Check if this is really happening, and if you want it to do so. 5) Lastly, not sure how DEM coupling works, but this case could be run in steady-state, and you could guarantee the convergence more precisely using OF's residuals and monitors. In DEM, you first have to have a fully developed profile for LIGGGHTS to take over? Or it runs together with transient timesteps? Hope this helps! |
|
January 19, 2022, 07:58 |
|
#7 | |||||
Senior Member
Join Date: Jun 2020
Posts: 100
Rep Power: 6 |
Hello Julio
Thank you so much for arranging time and looking into the case. Quote:
Quote:
Quote:
about the fully developed flow: thanks for clearing my doubt regarding fully developed flow. Does fully develped flow should also not chnage in spanwise direction (z-dir, front and back). I am asking this question because applying different bc at front and back boundary will result different flow solutions. for example using symmentry and zero gradient in z-direction will have different flow solutions and which one is neat to fully dveloped flow? Quote:
Quote:
I wrote quite a much but I thought its worth to discuss it with you. Thanks and Best Regards Atul Jaiswal |
||||||
January 19, 2022, 09:34 |
|
#8 |
Senior Member
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9 |
Hi! So,
1) check blockMesh user guide, it will help you creating the mesh. You must create a 4-block mesh: bottom part of the "T", each side of the upper part, and the middle part where the previous three connect. Each block must have one of its side fully connecting to another's block side, that's why you need 4 blocks insted of 2. It's better to create that way, but if you want to use snappy, search the tutorials (using linux command, google it as I don't have it memorized) for snappy usage and you will see this surfaceFeatureExtractDict thing. It extracts the edges of your .stl surface por explicit snap to them. Check out wolfdynamics tutorial for snappyHexMesh. It explains eveything very well. 2) you want to have 2D symmetry in z-dir? that would make your case very fast to run, and possibly good results. Por particle tracking, though, I'm not sure if you need to resolve their movement in z-dir, and I don't know the LIGGGTHS limitations on 2D geometry. To make 2D, you need to have a 1-cell thickness in z-dir and make both patches as "empty" type (you can create straight from blockMesh). This will mean that your "slice" is sufficiently far away from the walls to neglect its influence. The cyclic bc (which works in 2d as well) can be done this way you did, but it's better to use createPatch 3) I don't think you need mapping at all, not cyclic, specially if run 2D (which is very fast). just make a far-enough inlet BC so the profile can develop. There are typical numbers on that, I don't remember exactly, but was something like 5 times the hydraulic diameter. Also, is your flume experiment simulating water? If so, isn't your top boundary opened to air? If that's the case, you might need to use interFoam to get this free surface. If not, check the influence of the top wall on your experiment and be careful with that. Maybe you could make it far enough from the main flow to isolate its contribution. About the fully developed, that only concerns about time evolution: the same cross-section at any future timestep will have the exact same 3D profile, that is, same points will have the same properties. If your setup demands you to account for the presence of the front and back wall, then you need to consider it. If, on the other hand, you're just interested in the middle section of your experiment setup, or and infinitely thick (z-wise) setup, you can consider the 2D "symmetry". 4) I wrote the previous comment about the open channel before seeing this. So, if you want an open channel, for best results I'd go with interFoam. Then you should definitely aim for 2D symmetry as it's a heavier solver. If you cannot couple this with DEM, stick with the slip condition but remember that slip still a wall bc, i.e, you don't have flow through it. It would be worth checking if a suficiently far top wall will impact the solution. You could run two test cases: interFoam vs pisoFoam-with far top bc and compare the fields. 5) Are you saying RANS or RAS? I think your RANS model will find a steady solution, as it is time-averaged. You will get the mean quantities. If your settings do change in time (inheritely transient) the solver will simply not converge as each iteration, as the flow will try to be somewhere else. Hope it helps! |
|
January 19, 2022, 12:03 |
|
#9 | ||||
Senior Member
Join Date: Jun 2020
Posts: 100
Rep Power: 6 |
Hello Julio
Code:
1) check blockMesh user guide, it will help you creating the mesh. You must create a 4-block mesh: bottom part of the "T", each side of the upper part, and the middle part where the previous three connect. Each block must have one of its side fully connecting to another's block side, that's why you need 4 blocks insted of 2. It's better to create that way, but if you want to use snappy, search the tutorials (using linux command, google it as I don't have it memorized) for snappy usage and you will see this surfaceFeatureExtractDict thing. It extracts the edges of your .stl surface por explicit snap to them. Check out wolfdynamics tutorial for snappyHexMesh. It explains eveything very well. Quote:
Quote:
-opensource CFD-DEM code only couples the pisoFoam and Liggghts thats why I must set up my case only in two-phase. To reduce the effect of top wall on infiltration phenomena, slip bc seems to be suitable. As I have certain water depth in flume and top wall is located at the elevation. I cant make the top wall very far, in this case the water depth will be increased and flow velocity will decrease and flow conditions will no longer be same as in the experiment. Quote:
Quote:
I am really learning alot of things from our discussion. Thanks! -Atul |
|||||
January 19, 2022, 15:46 |
|
#10 |
Senior Member
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9 |
2) Yes, you can use half symmetry in the z-dir (perpendicular to the flow direction, right?). There you could also use cyclic, though I'm not sure how LIGGGHTS will behave. Have you considered using just MPPICFoam instead of DEM? It is much less demanding.
3) Yes, you could first run a simulation with just the inlet/outlet cross section (same coordinates as yours) and run to convergence. Then map this inlet profile back to your case with the cavity. 4) Since you have a heavy case, stick with the slip BC for now. It should give fair results, you are right. But keep in mind that this is not the same as solving for open channel! Glad that I'm helping! |
|
January 24, 2022, 12:35 |
|
#11 | |
Senior Member
Join Date: Jun 2020
Posts: 100
Rep Power: 6 |
Hello Julio
I was quite busy last week, now I am back. Quote:
Best Regards Atul |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Initialize flow from different geometry | B.Axel | FLUENT | 2 | January 24, 2018 14:15 |
Solving complex geometry with compressible flow | gfoam | FLUENT | 1 | May 19, 2017 15:56 |
Cyclic inlet/outlet + specified volumetric flow rate possible? | eivind | OpenFOAM | 2 | March 20, 2017 07:41 |
[GAMBIT] meshing in GAMBIT, a flow through a pipe having complex inflow geometry | mazhar1613 | ANSYS Meshing & Geometry | 1 | January 12, 2012 00:18 |
Abnormal flow pathline in 3D geometry | subha_meter | Main CFD Forum | 0 | July 26, 2010 07:18 |