|
[Sponsors] |
January 19, 2017, 09:56 |
|
#21 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
Quote:
yes, but as you see these topics are more towards the information technology field than an actual CFD R&D ... |
||
January 19, 2017, 10:02 |
|
#22 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34 |
Quote:
In an industrial set up, where this implementation stands, that remains concern to me. |
||
February 27, 2017, 07:30 |
|
#23 |
Senior Member
|
Dear Arjun & Filippo,
before providing my data on the mass leak for my immersed boundary implementation, i wanted to implement some method to control it, also in order to have the most complete view on the subject. As previously mentioned, I'm doing it like for classical incompressible outflows (but i'm doing it for walls): 1) I compute all the fluxes regularly and monitor the massflow trough each solid surface 2) After the fluxes have been applied I do a second sweep on immersed boundary faces and apply a local correction to the mass flux, proportional to the local cell face area and distance of the face center from the true boundary, i.e., mass_flux_correction = -mass_leak*(A*d)^2/SUM_faces(A*d)^2 where the square and distance (which are not tipically used for incompressible outflows) come from the Kang & Iaccarino formulation I previously mentioned (it is largely ininfluent at the moment), but I apply it after the boundary conditions (and not in advance) to properly take into account the effect of the convection scheme on the boundaries. Now, this actually seems to work, as now, at convergence, I am able to recover all the mass fluxes properly (i.e., min-mout is within machine precision at convergence, no matter how many solid surfaces i have in the fluid). However, there is a detail of the implementation which I'm not quite sure about it and I'd like to hear from you. As this is not specifically related to the immersed boundary but, more generally, to the massflow correction at the outflows, I think you can help. The point is basically this: when applying the correction to the mass flux, I have found that it is necessary to also correct the fluxes of the remaining variables. Turbulence and other scalars are handled automatically as I directly correct the massflux on the face before using them. The problem is on how to handle correctly the 4 variables whose equation is coupled with the mass equation, velocities and enthalpy. Basically, what happens is that my overall flux before the correction has been upwinded following the roe scheme. Now, i have to correct that flux with a specified mass flux, so i know its direction. I would tipically either do scalar upwind based only on the correction or just use the boundary value (which, differently from outflows, for walls is always known). My concern, however, is on the overall consistency of the upwind, as the correction might or not end up in the same original direction of the main mass flux and, more imortantly, it could even revert it when summed to it. My only consistent option here seems to do 2 loops on the roe scheme: a first one just computing the basic fluxes to detect the mass leak; then applying a correction to the velocity, maybe on both sides of the faces; finally a second loop, the true one, where the actual fluxes are computed based on the corrected velocities. What do you think about this? Doing 2 loops of Roe fluxes, at the moment, would be pretty expensive for me. Also, I'm not even sure that the resulting final flux would then actually fix the mass leak. Note, however, that, especially at convergence, the mass flux correction is tipically small and, at the moment, I have no specific issue in just avoiding the upwind overall (I just correct the fluxes with the boundary values i have at walls). My concern is mostly related to the path to convergence, during which I expect (but still have to experience) some trouble. |
|
February 27, 2017, 09:18 |
|
#24 | ||
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34 |
Quote:
Second option would be to use distance weighted central scheme Or a combination of both these schemes. Quote:
PS: I understand you know this but just to make sure, std::vector <int> list; list.reserve( max_size_you_could_need); Proceed to collect these cells and faces. (Actually this shall be already available when you moved immersed boundary). PS2: I am out of station so when I return I will reread what you wrote to see if I could add anything. |
|||
February 27, 2017, 10:35 |
|
#25 | |
Senior Member
|
Quote:
Still, I will investigate the second option as soon as I have everything in place (I'm still paying some naivity in code structure, having given the immersed boundary idea more weight than the unstructured grid one). P.S. As soon as I can I will give some numbers on the mass leak issue, comparing the two versions of the code (with and without correction). |
||
February 27, 2017, 12:50 |
|
#26 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
I don't know if I can be of some help, many years passed since last time I worked on IBM. Here you are just my 1 cent
1) it is a good idea to check the local direction for the upwind, some local change in the direction can be possible 2) I am not sure to understand the global formulation but if you are working with the incompressible constraint div v = 0, I would think that a local mass correction produces a perturbation in pressure gradient that, by assumption M=0, is elliptic and no longer localized. I am wrong? |
|
February 27, 2017, 14:43 |
|
#27 |
Senior Member
|
Well, I try to give some context.
Imagine an incompressible outflow boundary, part of a domain with a certain number of inlets. At steady state and machine precision convergence you know that the mass flux exiting from the outlet is equal to the sum of the mass flows at the inlets. Fluent, and I guess most unstructured cell centered FV solvers use this information to correct the mass fluxes at outlets where the fluxes are subject to extrapolations and might not exactly preserve the mass with respect to inlets. This is done, i guess, just before solving for the pressure. When seen from a Helmholtz-Hodge decomposition point of view this can also be translated into: 1) Momentum equations are solved with bcs only on the vorticity field. The mass flux at exit does not generally respect the one at inlet (if one was actually given). 2) Pressure poisson equation is solved with bcs on the potential field only. This means that mass fluxes at inlet and outlet are possibly corrected trough the Poisson bcs in order to match at machine precision. The two approaches are the same in the sense that correcting the outflow in advance (before Poisson) is not really different from applying part of the potential bcs in the momentum equations directly (a thing that even the most radicalized HH decompositioners tipically do), i.e., if you fix the wall normal velocity in the momentum part and carefully manage the pressure part, the pressure correction is not gonna change that. With this framework in mind, and coming from an unsuccessful application of the K&I approach in the bc part of my immersed boundary code, i made the following assumption: - wall/symmetry boundaries are in several aspects similar to incompressible outflows for me: i know exactly in advance what the mass flux trough them should be; still, for some reason, I cannot match that with a straightforward interpolation/extrapolation. - if a correction can be applied to incompressible outflows, maybe it will work also in my case - obviously, I have to deal with the fact that for unsteady compressible flows i might still be making an error (- Integral of drho/dt over the volume enclosed by the surface where I apply the correction and my true boundary). So, basically, I implemented the approach and it worked. And worked better on the Arjun suggestion. Here the issue was that, besides mass fluxes, I had to also correct all the other fluxes of the 5 main equations (as I work with a density based approach). Those, I assumed, can be treated like regular fluxes of scalar variables and I just had to choose the flux scheme. Upwind was my choice, in order to be consistent with the main scheme. What to choose as local upwind discriminant (so, to answer your first question, yes, I am using a local upwinding, also because the local flow field is a discretization-error-consistent perturbation of zero, in both directions) was more elaborate and my first choice (the local correction) didn't always worked as expected, producing convergence issues for some cases. The Arjun suggestion, use the mass flux before the correction as local upwind discriminant, worked better and fixed my problematic cases. For what concerns your second point, there are two specificities: 1) a preconditioned density based code is just like a pseudo-compressibility code, the continuity equation is never elliptic. 2) independently from the previous point, the perturbation I introduce tends to reduce with the iterations and, in general, it is proportional to the local truncation error (that's the reason for the K&I formulation). |
|
February 27, 2017, 15:24 |
|
#28 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
Quote:
Coming back to the main point, do you get the divergence-free fulfilled also cell by cell? |
||
February 28, 2017, 09:42 |
|
#29 |
Senior Member
|
Well, i know that the continuity equation is never elliptic. What i meant to say is that the pressure equation in my method (preconditioned density based) is like the pressure equation in the pseudo-compressibility approach, it is not elliptic. Not even for fully incompressible flows. However, it should be elliptic at convergence for incompressible flows (when the pseudo-time derivative disappears), but I'm not sure about this.
I don't know if I get your point here, but the correction that I'm applying does not evidently alterate the local flow field, and actually helps me to get full convergence for some cases (typically in enclosures) where the whole boundary flux was subject to interpolation (think, for example, to an inclined lid driven cavity, I wasn't able to get full convergence before, because of the mass leak). Concerning the diverge free issue, yes, my mass flux is conservative on a cell-by-cell basis, also without mass leak correction. |
|
December 4, 2019, 10:21 |
Immersed boundary
|
#30 | |
New Member
Deutschland
Join Date: Jun 2019
Posts: 21
Rep Power: 7 |
Quote:
Hello every one, I want to know that does Fluent can support the immersed boundary for CFD_DEM for unstructured mesh? if not do you have any suggestions about which software can be proper? kind regards, Arghavan |
||
December 4, 2019, 18:21 |
|
#31 |
Senior Member
|
You can get your answer by simply googling "fluent immersed boundary".
It was available in the past: https://www.ansys.com/resource-libra...dvantage-v3-i2 Not sure as of today. There are also other software with immersed boundary capability. Still, if DEM is what you need, just look for that and leave the implementation to the solver. |
|
December 5, 2019, 05:39 |
|
#32 | |
Senior Member
|
Quote:
This modification emerged for a highly separated case with thermal wall functions, which had a zone where the flow was highly irregular (so the WF, in the first place, was not probably correct) and the upwind correction started to erratically push large temperature puffs in the field, eventually leading to convergence problems. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
3D Windturbine simulation in SU2 | k.vimalakanthan | SU2 | 15 | October 12, 2023 06:53 |
implementation of the Immersed Boundary Method | mi_cfd | Main CFD Forum | 19 | April 24, 2019 02:24 |
[ImmersedBoundary] Is Immersed Boundary Method already available in OF 2.1.x or 2.2.x | keepfit | OpenFOAM Community Contributions | 16 | April 27, 2016 08:24 |
Code for Immersed Boundary Method (ask for help) | syq129 | Main CFD Forum | 2 | November 23, 2010 04:16 |