CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

On the immersed boundary method

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2017, 09:56
Default
  #21
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by arjun View Post
Yes. Challenges are many fold though:

1. Getting it right in polyhedral format.
2. Doing it efficiently.
3. Efficient parallel implementation.
4. Using it for more than just velocity enforcement. So far immersed boundary means forcing flow.


Personally I am attracted towards cut cell type but without actually creating cut cells.

yes, but as you see these topics are more towards the information technology field than an actual CFD R&D ...
FMDenaro is offline   Reply With Quote

Old   January 19, 2017, 10:02
Default
  #22
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by FMDenaro View Post
yes, but as you see these topics are more towards the information technology field than an actual CFD R&D ...
Yes. I think about Wildkatze and the immersed boundary framework and this is what I see to be solved.

In an industrial set up, where this implementation stands, that remains concern to me.
arjun is offline   Reply With Quote

Old   February 27, 2017, 07:30
Default
  #23
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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.
sbaffini is offline   Reply With Quote

Old   February 27, 2017, 09:18
Default
  #24
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by sbaffini View Post
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 thinking is that as the iterations go ahead and it converges then the corrections become small and smaller, keeping this in my I would use them based on upwind from main flux values and will ignore the direction change.

Second option would be to use distance weighted central scheme Or a combination of both these schemes.

Quote:
Originally Posted by sbaffini View Post
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.
This option is quite good in my opinion, I would make only one change, I would make list of cells and faces where these correction to be applied and then revisit only them and not the whole thing.

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.
sbaffini likes this.
arjun is offline   Reply With Quote

Old   February 27, 2017, 10:35
Default
  #25
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by arjun View Post
My thinking is that as the iterations go ahead and it converges then the corrections become small and smaller, keeping this in my I would use them based on upwind from main flux values and will ignore the direction change.
This seems to be working just great (for the few inviscid cases where I had some troubles and suspected this to be the issue). Thanks!

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).
arjun likes this.
sbaffini is offline   Reply With Quote

Old   February 27, 2017, 12:50
Default
  #26
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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?
FMDenaro is offline   Reply With Quote

Old   February 27, 2017, 14:43
Default
  #27
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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).
arjun likes this.
sbaffini is offline   Reply With Quote

Old   February 27, 2017, 15:24
Default
  #28
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sbaffini View Post
1) a preconditioned density based code is just like a pseudo-compressibility code, the continuity equation is never elliptic.
Paolo, the continuity equation is never elliptic, it is alway hyperbolic even in the form Div v =0. But the pressure equation is, and since dp/drho -> Inf you have that any small mass perturbation introduces everywhere a pressure variation. Maybe I am not understanding you procedure...

Coming back to the main point, do you get the divergence-free fulfilled also cell by cell?
FMDenaro is offline   Reply With Quote

Old   February 28, 2017, 09:42
Default
  #29
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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.
sbaffini is offline   Reply With Quote

Old   December 4, 2019, 10:21
Default Immersed boundary
  #30
New Member
 
Deutschland
Join Date: Jun 2019
Posts: 21
Rep Power: 7
Arghavani is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
I worked on the IBM several years ago, using 2D unstructured grids with elastic membranes moving over it. I followed the formulation of Peskin.
This formulation produces stifness problems for rigid element.

My main concern is about the correct simulation of closed not-permeable body where you must ensure the mass conservation. Some papers tried to improve this aspect but as I am no longer involved in this topic I am aware only of old papers.
I wonder if any of you have performed a quantitative analysis of that. For example, a simple channel flow with a rectangula bluf body simuolate by the immersed boundary. Did you check that the body is really not permeable at machine accuracy or you let that is not permeable at the accuracy of the local truncation error? Does the inflow flow rate of the channel is as same as that at the outlet?

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
Arghavani is offline   Reply With Quote

Old   December 4, 2019, 18:21
Default
  #31
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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.
sbaffini is offline   Reply With Quote

Old   December 5, 2019, 05:39
Default
  #32
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by sbaffini View Post
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.
It might be worth to mention now that, in the end, I found that the most robust approach to the upwinding matter was to actually forget about the upwind and just make the correction using the values from the adjacent fluid cell. This, by construction, can never introduce spurious values in the field.

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.
sbaffini 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
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


All times are GMT -4. The time now is 20:15.