Fluid Oscillating in a Channel CFD

  • #1
joshmccraney
Gold Member
2,253
143
Hi PF!

I'm simulating two fluids, air (blue) and water (red), in a 2D rectangular channel. See picture below:
Screen Shot 2019-08-08 at 4.54.58 PM.png

I've turned gravity and viscosity off, and have ##\rho_w=1000## kg/m^3 and ##\rho_a = 0.01## since it cannot be zero. I've also enforced a static contact angle of ##\theta = 71^\circ##. I can list other properties and schemes if you'd like (I'm running this in OpenFOAM). But my question is, after a very long time the surface starts to become static, getting closer and closer to equilibrium: why? Seems odd to me since there is no gravity or viscosity acting to stabilize the interface.
 

Answers and Replies

  • #2
JBA
Science Advisor
Gold Member
1,542
461
This is way off from my expertise: but, I suspect that since each oscillation displacement requires energy, as the oscillations proceed the initial displacement energy is continuously reduced to the point that it reaches zero and the interface becomes static.
 
  • #3
joshmccraney
Gold Member
2,253
143
This is way off from my expertise: but, I suspect that since each oscillation displacement requires energy, as the oscillations proceed the initial displacement energy is continuously reduced to the point that it reaches zero and the interface becomes static.
Hmmmm but think about the un-damped harmonic oscillator. Will it ever stop without damping? To me, this is identical logic. Perhaps @boneh3ad or @Chestermiller could comment?
 
  • #4
boneh3ad
Science Advisor
Insights Author
Gold Member
3,386
1,171
I am quite confused about what you are actually simulating here. Some questions/comments:
  • You are using air and water, but you seem to have picked some arbitrary density (your ##\rho_a## corresponds to the density of air at about 20,000 m altitude).
  • What do you mean by static contact angle in this context? This typically applies to the contact angle between a liquid droplet and a solid surface, which is not what you have here. Are you using that as a parameter essentially describing surface tension in the water?
  • Apparently this simulation varies in time, but you've given us no indication of why that might be the case since you don't mention initial conditions or what you are actually intending to capture here.
  • Have you considered numerical dissipation?
 
  • #5
joshmccraney
Gold Member
2,253
143
I am quite confused about what you are actually simulating here. Some questions/comments:
  • You are using air and water, but you seem to have picked some arbitrary density (your ##\rho_a## corresponds to the density of air at about 20,000 m altitude).
  • What do you mean by static contact angle in this context? This typically applies to the contact angle between a liquid droplet and a solid surface, which is not what you have here. Are you using that as a parameter essentially describing surface tension in the water?
  • Apparently this simulation varies in time, but you've given us no indication of why that might be the case since you don't mention initial conditions or what you are actually intending to capture here.
  • Have you considered numerical dissipation?
1) Ideally ##\rho_a = 0## but OpenFOAM crashes so I used a small number.

2) In equilibrium, the water would make a ##71^\circ## contact angle with the wall. I'm requiring the contact angle to always be ##71^\circ## regardless of being in equilibrium or not.

3) Time ##t = 0## the water makes a circular arc with contact angle ##\approx 150^\circ##, so not at equilibrium. At time ##t > 0##, surface tension tries to equilibrate the system to its static contact angle and equilibrium position, inducing perturbations from equilibrium. I'm trying to measure these perturbations (oscillations) in time.

4) I have, but am unfamiliar with how I could check to see if it's present. Any ideas?

Video here:
 
  • #6
JBA
Science Advisor
Gold Member
1,542
461
Hmmmm but think about the un-damped harmonic oscillator. Will it ever stop without damping?
Zero damping is only theoretical; because, it ignores internal damping and energy loss in the associated materials due their deformations required for the lateral displacements, i.e, in "zero dampened" springs, that loss is in the form of heat.
It is appropriate for the program to "crash"; because, that means it recognizes that zero dampened harmonics result in infinite displacements.
 
  • #7
joshmccraney
Gold Member
2,253
143
Zero damping is only theoretical; because, it ignores internal damping and energy loss in the associated materials due their deformations required for the lateral displacements, i.e, in "zero dampened" springs, that loss is in the form of heat.
It is appropriate for the program to "crash"; because, that means it recognizes that zero dampened harmonics result in infinite displacements.
Yes, theoretical is actually what I'm trying to compare to. If the model does not include heat losses, then we should not see the harmonic system damp. This is why I'm wondering what's going on. I have no heat losses, no viscosity, no gravity.
 
  • #8
JBA
Science Advisor
Gold Member
1,542
461
I have no heat losses, no viscosity, no gravity.
The total lack of damping is the reason the program crashes!
 
  • #9
joshmccraney
Gold Member
2,253
143
That is the reason the program crashes!
The system does not crash--see video. It only crashes when I turn density off, but that's because OpenFOAM is solving a system of PDEs and one of those PDE's becomes 0. Density is a moot point here I think, and likely not worth the attention we're giving it, (zero gravity).
 
  • #10
boneh3ad
Science Advisor
Insights Author
Gold Member
3,386
1,171
Why are you not using an actual air density instead of an arbitrarily small air density? I don't think it's fair to say that ideally ##\rho_a = 0## and still call it air. Not that this likely makes any difference anyway. The Atwood number for water and air at sea level is ##At \approx 0.9976## and in your case is ##At \approx 0.9999##, so this is really just me being nitpicky about your choice of language here.

So this starts out as a droplet of sorts in a rectangular duct and you are watching it wet the walls dynamically? When you talk about these things, you really need to be clear about what you are actually simulating, and in a dynamic problem like this, describe (or better, show) the initial conditions. Showing a series of snapshots or a movie would be even more helpful. Where are the walls? Is there any other flow?

If you've eliminated the possibility of other sources of dissipation in the actual physical system you are modeling, then numerical dissipation would seem to be about the only remaining explanation. I am an expert neither in computational fluid dynamics nor in two-phase fluid dynamics, so there is not a whole lot further that I can take that line of inquiry.
 
  • #11
joshmccraney
Gold Member
2,253
143
Showing a series of snapshots or a movie would be even more helpful. Where are the walls? Is there any other flow?
Are you unable to see the video in post 5? I see it, but then again I uploaded it.

If you've eliminated the possibility of other sources of dissipation in the actual physical system you are modeling, then numerical dissipation would seem to be about the only remaining explanation. I am an expert neither in computational fluid dynamics nor in two-phase fluid dynamics, so there is not a whole lot further that I can take that line of inquiry.
Gotcha, thanks for your time though!
 
  • #12
boneh3ad
Science Advisor
Insights Author
Gold Member
3,386
1,171
For whatever reason, that video didn't seem to appear earlier. I see it now. Are your boundary conditions periodic? What sort of formulation is used for your equations (e.g. do you solve it spectrally in the horizontal direction or anything)?
 
  • #13
joshmccraney
Gold Member
2,253
143
For whatever reason, that video didn't seem to appear earlier. I see it now. Are your boundary conditions periodic? What sort of formulation is used for your equations (e.g. do you solve it spectrally in the horizontal direction or anything)?
My boundary conditions are not periodic: the left, right, and bottom are no penetration boundary conditions with a zero velocity there. The roof is an atmospheric BC, so it avoids backflow into the domain.

I am using finite volume, so no spectral approach. In time, a first order implicit bounded Euler scheme, and Gauss linear for gradient schemes.
 

Suggested for: Fluid Oscillating in a Channel CFD

  • Last Post
Replies
3
Views
782
  • Last Post
Replies
0
Views
666
Replies
2
Views
377
  • Last Post
Replies
2
Views
264
Replies
4
Views
536
Replies
0
Views
1K
  • Last Post
Replies
5
Views
848
Replies
0
Views
2K
Replies
4
Views
869
Top