Implementing a dynamic retention force in interFoam
I'm new to OpenFOAM and need your help. I have read the user guide and part of the programmers guide, and experimented a little with the tutorials, but that is about as far as I have come so far. Also I should add that my knowledge of C++ is limited and a bit rusty. I have searched the forum and elsewhere but could not find anything relating to my problem.
I am simulating airflow through a straight 2D (for now) channel of 1cm height and 20 cm length and the interaction of the flow with a water droplet in the middle of the channel. I modified the DamBreak tutorial and after some initial difficulties got it to to work so that the droplet is set in motion by the airstream and is eventually pushed out of the channel.
What i want to do now is to introduce a holding/retention force acting on the droplet which is dynamically adjusted during the simulation so that the droplet stays in the middle of the channel regardless of the velocity of the air. The goal is to get a single force value for each air velocity value, and then use these values to calculate the drag force coefficient. Unfortunately, I have no idea how to go about this. I would appreciate any suggestions!
Thanks in advance
Would it maybe be possible as a first step to use the gravitational force in the way i described above? It would affect the water drop while the effect on the air should be negligible. Is it possible to alter gravity while a simulation is running?
I found a solution that works for me. Basically I was able to modify the code proposed in this thread
so that now g is independent of time but dependent on the position of the droplet. I'll enclose the (very simple) piece of code I first tried out as an example. I'm sorry it didn't occur to me to post this earlier, but apparently this topic isn't of interest to anyone anyhow, so I guess it doesn't matter.
|All times are GMT -4. The time now is 18:12.|