GASciences
Forum Replies Created
-
AuthorPosts
-
GASciencesParticipant
Thank you for your answer @mathias. I am tempted to ask another question then: Let’s take again the example of “ShanChenForcedSingleComponentPostProcessor” if we look at the end of this function it seems that the content of the FORCE field is purely overridden by the EXTERNAL_FORCE field + the additional Shan-Chen model’s term :
auto force = cell.template getField<descriptors::EXTERNAL_FORCE>();
cell.template setField<descriptors::FORCE>(force – g*rhoContribution/rho);But what if somewhere else on the application the FORCE field is used? I assume that the application developper will have to re-write this portion of code then.
Also, if I look at the forcing.h file, all the forcing schemes seems to take the FORCE field into account but none takes the EXTERNAL_FORCE. Which leads me to think that if an application developer wants to use the EXTERNAL_FORCE field he/she either has to override the FORCE field the same way “ShanChenForcedSingleComponentPostProcessor” does or to re-write and adapt a forcing scheme, is that correct?
Sorry for this basic questions but the concept of EXTERNAL_FORCE Vs FORCE is puzzling. For example, the user manual only mentions the FORCE field and in quite general examples (no mention of the surface tension I believe).
Thanks again, I believe this discussion already provided me enough understanding to implement the Huang et al liquid/fluid interaction force.
Gilles
GASciencesParticipantHello,
First of all, thank you for both of you for your discussion, it made me progress a lot on understanding how to customize boundary conditions.
I have a couple of question though:
– @Matt, have you progressed since your last message?
– @Sam, you provide a reference in your first reply that suggests to add and solid/fluid interaction term to the Shan-Chen fluid/fluid interaction force. But wouldn’t doing so via a similar approach as in the ‘setFreeEnergyWallBoundary’ function necessitate some kind of “coupling” ? (just like the Shan-Chen forced postProcessor in the phase separation example in 2D)
– @both of you guies, don’t you think that, according to the way this additional force term is formulated in the cited Huang et al paper, adding this solid/fluid interaction force term directly into the bulk resolution? (by applying this force to every bulk node and just use a “solid neighbor indicator function” as a factor as suggested in the paper). In that case I would start from the ShanChenForcedSingleComponentPostProcessor (or any similar one depending on the issue to solve) and modify it directly. (this approach seems safer to me, a pure roockie of OpenLB, since I am not sure yet if one can modify the FORCE field in two speparate postProcessor (I am not sure I understand yet the difference between EXTERNAL_FORCE and FORCE fields))Cheers,
Gilles
GASciencesParticipantHi Lucas,
I just want to provide additional comments, mostly for other answers seekers like myself.
You said in you question that you are looking for a way to change the interaction force’s formulation and that you looked into the velocity shift implementation and still had no clue on how to do it.
It is implicit in Stephan’s answer, but the velocity shift is not where the interaction force is calculated, it is rather where this force is introduced into the collide step, no matter the equation you use to calculate it. As Stephan said, you rather want to use another postProcessor to calculate it, look for example ShanChenForcedSingleComponentPostProcessor which does (used in examples//multiComponent/phaseSeparation2d/phaseSeparation2d.cpp).
Finally, you said you are interesting in implementing your own solid/liquid interaction force’s formulation? Then maybe considering a boundary condition is what you need ? In that case, have you looked at this answer https://www.openlb.net/forum/topic/wetting-with-free-surface-or-large-density-ratio/#post-7308 ?
Cheers,
Gilles
-
AuthorPosts
