[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??
From: |
Wink, Markus |
Subject: |
Re: [ESPResSo-users] No conservation of momentum/mass in LBM ?? |
Date: |
Thu, 17 Mar 2016 14:51:00 +0000 |
Hello everybody,
> Your plot suggests that the inlet velocity is different from the outlet
> velocity. In that case it makes sense that the boundary effects have a
> different extent.
Sorry for the misleading picture. The first and last data point should of cause
be the velocity of the rhomboid. I set both rhomboids with the same velocity
(see tcl-script attached). So the boundary effects should have same extent,
which they clearly don't have. Could this also be related to a slightly
compressed fluid?
> In LB, as you say, the pressure is proportional to the density, so you could
> set the density at the outlet. This is in fact what the Zhou/He boundary
> condition effectively does.
Is it really that simple? I mean, for the outlet we have 5 unknown distribution
functions (the ones having a velocity vector pointing inwards to the channel).
If I set a certain density at the outlet, I only have one equation for those 5
unknown distributions. I could also imply a normal output boundary condition
for the flow, so setting u_y and u_z to zero. This gives me another two
relations. As far as I know, Zou/He assume furthermore, that for the
non-equilibrium part of the distribution function there is a bounce-back rule,
giving the last two relations needed to solve the system of equations.
I am just wondering, if it is promising to just set the density at the outlet
to a certain value (maybe in combination with normal output condition for the
velocity) to get rid of the output effects. Any idea/feeling about it?
Greetings
Markus
-----Ursprüngliche Nachricht-----
Von: Ulf Schiller [mailto:address@hidden
Gesendet: Donnerstag, 17. März 2016 14:30
An: Wink, Markus; address@hidden
Betreff: Re: AW: [ESPResSo-users] No conservation of momentum/mass in LBM ??
Hi Markus,
On 03/17/2016 05:33 AM, Wink, Markus wrote:
> Hello everybody,
>
> I checked the mass flux. It is constant over the length of the channel (some
> oscillations at the outlet, but I am not concerned about it). I revised the
> script and now I get the maximum velocity right (less than 1% deviation to
> the theoretical one). But I am still puzzling with some aspects. First of all
> I checked whether the density is constant. Within one plane perpendicular to
> the direction of flow, that is the case. Along the direction of transport, I
> notice a drop of the density. This makes sense to me, since the density is
> proportional to the pressure and I expect a linear pressure profile along the
> channel.
Well, in principle the density should be constant in an incompressible fluid.
Now, since you are adding momentum to the system through the inlet velocity, I
think the fluid is locally compressed at the inlet, so a (small) density
gradient may develop. So I think your observation makes sense. However, if the
density gradient becomes too large, it may lead to instabilities.
> Nevertheless, there are some questions left.
>
> 1) I have noticed, that in both cases, whether if I apply a body force to the
> fluid or an constant velocity inlet boundary condition, the maximum velocity
> of the profile is a bit lower than the expected one (although it is quite
> good with less than 1% deviation). I am just wondering, since I checked two
> "methods", whether this deviation lies in the nature of the LBM algorithm?
I would say 1% is a pretty good agreement. You could check that you get the
expected convergence by reducing the grid size (see below).
> 3) With a constant velocity inlet and constant velocity outlet I have inlet
> and outlet effects of cause a certain length (until the profile develops). I
> was expecting that the two lengths should be equal, since I have equivalent
> boundary conditions. In the appendix you will see, that this is not the case
> (it shows the velocity as a function of the x-position, while y- and z- are
> set to half the channel width/height). The entry effect seems to be much more
> pronounced, but I am not sure why. Does anyone have an idea?
Your plot suggests that the inlet velocity is different from the outlet
velocity. In that case it makes sense that the boundary effects have a
different extent.
> 4) As an outlet condition it would be neat to have a constant pressure
> boundary condition (with that, one would eliminate the outlet effect). I was
> thinking to put the outlet-nodes to a constant pressure via lbnode set. Is
> there a command for setting the pressure of a node to a given value
> (investigating the source code it seems, that there is only "lbnode x y z
> print pi" but not set).
In LB, as you say, the pressure is proportional to the density, so you could
set the density at the outlet. This is in fact what the Zhou/He boundary
condition effectively does.
> 5) What is the proper way to get the mean velocity out of the mass flux? If I
> sum up the velocities and divide by the cross section, I get a slight
> increase of v_mean along the channel (I have no idea why).
This could be related to the different velocities at the inlet and the outlet.
The mass flux should be constant far away from the boundaries though.
> 6) Have anyone ever checked the second order accuracy of the LBM in ESPResSo?
I did that a long time ago, and would support the idea of adding a
corresponding test case. However, many of the LB features in ESPResSo,
including the integrator, are only first order accurate (either in time or
space).
Hope this helps.
Best wishes,
Ulf
> -----Ursprüngliche Nachricht-----
> Von: address@hidden
> [mailto:address@hidden
> org] Im Auftrag von Ulf Schiller
> Gesendet: Mittwoch, 16. März 2016 13:49
> An: address@hidden
> Betreff: Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??
>
> Hi Markus,
>
> sorry for the confusion. In my earlier email I should have said mass flux of
> course, i.e., the Q in the formulas Kai provided. You can calculate that from
> the simulated velocity profile for each plane along the channel, and it
> should be constant.
>
> Best,
> Ulf
>
> On 03/16/2016 08:21 AM, Georg Rempfer wrote:
>> Assuming the fluid is not compressed (you could check that, but it's
>> likely true), the mass flux is proportional to the velocity. You
>> claim the average velocity in the channel direction is too low half
>> way between inlet and outlet. This implies that mass gets lost
>> between the inlet/outlet and the middle (or that the lb fluid is
>> denser in the middle). Can you check that?
>>
>> On Wed, Mar 16, 2016 at 1:02 PM, Wink, Markus
>> <address@hidden
>> <mailto:address@hidden>>
>> wrote:
>>
>> Hello everybody,____
>>
>> __ __
>>
>> thank you for your answers. I did not get it. Which quantity is of
>> interest? Mass flux or momentum flux? I am not sure about it,
>> although to check whether mass conservation is fulfilled, both
>> should work, am I right?____
>>
>> __ __
>>
>> __ __
>>
>> Greetings____
>>
>> __ __
>>
>> Markus____
>>
>> ____
>>
>> __ __
>>
>> __ __
>>
>> *Von:address@hidden
>> <mailto:address@hidden>
>> [mailto:espressomd-users-bounces+markus.wink
>> <mailto:espressomd-users-bounces%2Bmarkus.wink>address@hidden
>> <mailto:address@hidden>] *Im Auftrag von *Georg Rempfer
>> *Gesendet:* Mittwoch, 16. März 2016 11:26
>> *An:* Kai Szuttor
>> *Cc:* address@hidden <mailto:address@hidden>
>> *Betreff:* Re: [ESPResSo-users] No conservation of momentum/mass in
>> LBM ??____
>>
>> __ __
>>
>> I agree with you argument, Markus. Mass conservation dictates that
>> the normal flow through every surface along the channel should be
>> the same (assuming the flow is incompressible). Together with the
>> fixed shape of the fully developed flow profile, this uniquely
>> determines the flow in regions far away from the inlet/outlet. So if
>> this does not come out correctly, mass conservation should be broken
>> somewhere. I don't think this is possible in the LB. Can you
>> calculate this flux through the surfaces along the channel and show
>> us where exactly it differs from the inlet/outlet?____
>>
>> __ __
>>
>> On Tue, Mar 15, 2016 at 5:09 PM, Kai Szuttor
>> <address@hidden <mailto:address@hidden>>
>> wrote:____
>>
>> Now with attachment :)
>>
>> Am 15/03/16 um 14:07 schrieb Ulf D Schiller:
>> > Did you check the flow rates directly, i.e., the momentum flux per
>> plane? Your argument seems correct, so I can only guess that there's
>> some
>> > flaw in the calculation of the mean velocity. I think there's an
>> expression for the flux in rectangular channels that one could use.
>> >
>> > Best,
>> > Ulf
>> >
>> > Sent from a mobile device.
>> >
>> >
>> > -------- Original message --------
>> > From: "Wink, Markus" <address@hidden
>> <mailto:address@hidden>>
>> > Date: 3/15/2016 8:47 AM (GMT-05:00)
>> > To: 'Ivan Cimrak' <address@hidden <mailto:address@hidden>>,
>> address@hidden <mailto:address@hidden>
>> > Subject: Re: [ESPResSo-users] No conservation of momentum/mass in
>> LBM ??
>> >
>> > Hi Ivan, Hi Florian,
>> >
>> >
>> >
>> >>/How did you compute the expected maximum velocity? As far as I
>> know, the poisseuille flow has an exact expression for the velocity
>> in the case
>> > of channel with circular cross section, and you have a rectangular
>> one.///
>> >
>> > / /
>> >
>> > I know the velocity of the rhomboid. Thus I know the mean velocity
>> of the fluid (assuming it is incompressible). I took that for
>> calculating the
>> > Reynoldsnumber, pressure gradient and theoretical velocity profile
>> (using the expression in the book “Viscous Fluid Flow” of Frank M.
>> White).
>> >
>> >
>> >
>> > /> //The boundaries are momentum sinks. (Florian)/
>> >
>> > /> Now I read the comment of Florian -//does that mean that amount
>> of fluid is decreasing when no-slip is prescribed?/
>> >
>> > I still don’t get it. That the boundaries are momentum sinks, I
>> agree. Due to the present of the walls and the “friction” of the
>> fluid there, I
>> > achieve the poiseuille profile. But I still hold the opinion, that
>> the mean velocity of the fluid should be the same.
>> > Imagine the following physical experiment: you have a syringe pump
>> set up with a constant flow rate Q0 connected to a rectangular
>> channel having
>> > a cross section A=w*h. The fluid in the channel then has a mean
>> velocity of v_mean=Q/A. Assuming an incompressible medium, this
>> means the
>> > velocity should be the same at every slice normal the direction of
>> transport.
>> > In my simulation, the mean velocity should be velocity v0 of the
>> rhomboid.
>> >
>> > So I still don’t get the deviation to the theoretical value…
>> >
>> > Greetings Markus
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> *Von:address@hidden
>> <mailto:address@hidden>
>> > [mailto:espressomd-users-bounces+markus.wink
>> <mailto:espressomd-users-bounces%2Bmarkus.wink>address@hidden
>> <mailto:address@hidden>] *Im Auftrag von *Ivan Cimrak
>> > *Gesendet:* Dienstag, 15. März 2016 13:22
>> > *An:* address@hidden <mailto:address@hidden>
>> > *Betreff:* Re: [ESPResSo-users] No conservation of momentum/mass
>> in LBM ??____
>>
>> >
>> >
>> >
>> > Hi Markus,
>> >
>> >
>> >
>> > Hello Everybody,
>> >
>> >
>> >
>> > so far, in the LBM scheme only the body force is implemented
>> and no velocity/pressure boundary condition. So I was thinking on a
>> way of
>> > mimicking a “velocity boundary” condition without changing the
>> source code. I am aware that one should, as a proper approach, using
>> Zou/He
>> > boundary conditions and adjusting the distribution functions
>> according to the boundary conditions.
>> >
>> >
>> >
>> > For that I have constructed a channel with rectangular cross
>> section and put the fluid inside. Furthermore, two rhomboids where
>> put inside,
>> > one at the inlet of the channel, one at the outlet. The cross
>> section of the two rhomboids is equal to the cross section of the
>> channel,
>> > furthermore they have a constant velocity v0.
>> >
>> > My idea was, that, since the no-slip boundary condition is
>> implemented, I force the fluid nodes adjacent to the rhomboids to
>> have a constant
>> > velocity, thus achieving constant velocity inlet/outlet condition.
>> >
>> >
>> >
>> > As a result I achieve a poiseuille profile in the middle of
>> the channel (fully developed flow after inlet/outlet effects). The
>> qualitative
>> > pressure gradient looks proper, too.
>> >
>> > Nevertheless, the maximum velocity is not the same as I
>> expected (factor 3 to the expected one).
>> >
>> > How did you compute the expected maximum velocity? As far as I
>> know, the poisseuille flow has an exact expression for the velocity
>> in the case
>> > of channel with circular cross section, and you have a rectangular
>> one.
>> >
>> >
>> > I have checked the mean velocity. I would expect, that the mean
>> velocity of the fluid should be the velocity v0 of the rhomboid (due to
>> > mass/momentum conservation), I get less (10 %).
>> >
>> > This is strange. The amount of fluid at the inlet (integral of
>> velocity over the inlet surface, in this case is the velocity
>> constant over the
>> > inlet surface) should be the same as integral over the middle
>> cross section, as well as integral over the outlet surface....
>> Supposing you
>> > computed the average velocity as sum of velocities over the LB
>> nodes at middle cross section divided by number of these nodes, you
>> should have
>> > obtained the velocity at the inlet...
>> >
>> > Now I read the comment of Florian - does that mean that amount of
>> fluid is decreasing when no-slip is prescribed?
>> >
>> > Ivan
>> >
>> >
>> >
>> > What is wrong with my idea stated here? Obviously, something is
>> not correct, but I have no idea, what the reason for that is. Where
>> does the
>> > momentum vanish?
>> >
>> >
>> >
>> > Does anybody have an idea?
>> >
>> >
>> >
>> > Sincerely,
>> >
>> >
>> >
>> > Markus
>> >
>> >
>> >
>> >
>> >____
>>
>> __ __
>>
>>
>
>
> --
> Dr. Ulf D. Schiller
> Assistant Professor
> Department of Materials Science and Engineering Clemson University
> 161 Sirrine Hall
> Clemson, SC 29634
>
> Office: 299c Sirrine Hall
> Phone: 1-864-656-2669
> Fax: 1-864-656-5973
>
--
Dr. Ulf D. Schiller
Assistant Professor
Department of Materials Science and Engineering Clemson University
161 Sirrine Hall
Clemson, SC 29634
Office: 299c Sirrine Hall
Phone: 1-864-656-2669
Fax: 1-864-656-5973
simulation.tcl
Description: simulation.tcl
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, (continued)
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Wink, Markus, 2016/03/15
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Ulf D Schiller, 2016/03/15
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Kai Szuttor, 2016/03/15
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Kai Szuttor, 2016/03/15
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Georg Rempfer, 2016/03/16
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Wink, Markus, 2016/03/16
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Georg Rempfer, 2016/03/16
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Ulf Schiller, 2016/03/16
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Wink, Markus, 2016/03/17
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Ulf Schiller, 2016/03/17
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??,
Wink, Markus <=
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Ulf Schiller, 2016/03/17
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Georg Rempfer, 2016/03/17
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Joost de Graaf, 2016/03/17
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Wink, Markus, 2016/03/18
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Georg Rempfer, 2016/03/18
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Wink, Markus, 2016/03/21
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Ulf Schiller, 2016/03/21
- Re: [ESPResSo-users] No conservation of momentum/mass in LBM ??, Ulf Schiller, 2016/03/18