# Fluid Oscillating in a Channel CFD

Gold Member
Hi PF!

I'm simulating two fluids, air (blue) and water (red), in a 2D rectangular channel. See picture below:

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.

Gold Member
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.

Gold Member
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?

Gold Member
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?

Gold Member
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:

Gold Member
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.

Gold Member
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.

Gold Member
I have no heat losses, no viscosity, no gravity.
The total lack of damping is the reason the program crashes!

Gold Member
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).

Gold Member
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.

Gold Member
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!