CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   Periodic & Oscillatory Boundary Conditions (https://www.cfd-online.com/Forums/star-ccm/135151-periodic-oscillatory-boundary-conditions.html)

 R.B.Riddick May 9, 2014 13:34

Periodic & Oscillatory Boundary Conditions

Hi,

Am new to the CFD field and STAR CCM+ is the only software I have used so far. I am trying to simulate fluid flow in an Continuous Oscillatory Baffled Crsytallyser (COBC). I would like to have a net flow of about 0.002m/s and on top of that I would like to have an oscillatory flow. I have managed to set periodic boundary conditions for both the inlet and outlet of my fluid but I dont know how to super impose oscillatory flow onto the net flow. The oscillation velocity equation is 2π*f*x0*sin(2πft). where; f is the frequency (5hz), x0 is the amplitude and t is the time.

 ping May 12, 2014 07:29

where ever you have entered your net flow as a constant you can enter an equation of the flow as a function of time using the \$Time field function - eg 3 * 1/5 *sin(\$Time) or whatever

so just recase your equation in those terms using the star-ccm+ field function equation syntax

your could also create a user field function with the same equation and then use its name in place of the flow constant

 R.B.Riddick May 20, 2014 05:56

4 Attachment(s)
Quote:
 Originally Posted by ping (Post 491245) where ever you have entered your net flow as a constant you can enter an equation of the flow as a function of time using the \$Time field function - eg 3 * 1/5 *sin(\$Time) or whatever so just recase your equation in those terms using the star-ccm+ field function equation syntax your could also create a user field function with the same equation and then use its name in place of the flow constant

Thank you for your reply to my problem, I did as you advised me to i.e.
At the inlet boundary conditions, for the velocity constant I entered; 0.002+(2*3.14*3*sin(2*3.14*5*\$Time))
However the velocity magnitude doesn't seem to be changing with time, simply because the time isn't changing. I noticed this when i plotted velocity against time. I have attached the results in this reply, please have a look. Also while running the simulation, the output window shows that the software is solving at different time steps and it goes to a amximum of 1000, would changing the stopping criteria help improve my solution.
I thank you for your help in advance.

 ping June 2, 2014 03:50

the results you posted are all at the end of the run and so only show you the results at the last time which is at 1 second
I can see you have the implicit unsteady solver enabled and that the output shows the last two timesteps
so you just need to create a few reports then monitor and plot these versus time and rerun the case eg i would create one of the surface average velocity magnitude on your inlet boundary and this will tell you if your velocity is changing the way you want it to
you could also create a report of time in the region to convince yourself that time is actually changing

 R.B.Riddick June 3, 2014 13:01

3 Attachment(s)
Quote:
 Originally Posted by ping (Post 495140) the results you posted are all at the end of the run and so only show you the results at the last time which is at 1 second I can see you have the implicit unsteady solver enabled and that the output shows the last two timesteps so you just need to create a few reports then monitor and plot these versus time and rerun the case eg i would create one of the surface average velocity magnitude on your inlet boundary and this will tell you if your velocity is changing the way you want it to you could also create a report of time in the region to convince yourself that time is actually changing

Hello, I have managed to create a report, monitor and plot of surface averaged velocity magnitude at the inlet, it is constantly 0. I dont know why this simulation is coming out wrong. also looking at the contour and vector plots of the velocity magnitude on the plane i created along the pipe, the value is way lower that the one am expecting from the user field function i created; 0.002+(2*3.14*3*sin(2*3.14*5*\$Time)). I should at least get a minimum velocit of 0.002m/s at any given time but am getting a highest velocity ~0.00001m/s.
I set up periodic boundary conditions, by creating Fully-Developed Interface at the inlet and outlet (Topology:Periodic). I then specified a mass flow rate of 3.92E-5 kg/s at this Periodic interface. I have attached some results of my simulation and have tried to captue the simulation tree hopefully you can spot the mistake am making.

 ping June 3, 2014 19:22

you were supposed to do the surface average velocity report etc on a boundary with flow ie in or out or an interface and not a wall where the velocity will always be zero when it has no slip enabled

i am confused about you boundary conditions since you talk about a constant flow of 3.92E-5 kg/s somewhere but then also the equation with sin and \$Time but you cant both

try a simple velocity inlet with the equation and a pressure outlet and rid the interface

when that works maybe try periodic with the equation as the mass flow

remember when you create an interface the original boundary settings are ignored whether it be a wall or inlet etc

 R.B.Riddick July 4, 2014 05:36

2 Attachment(s)
Quote:
 Originally Posted by ping (Post 495431) you were supposed to do the surface average velocity report etc on a boundary with flow ie in or out or an interface and not a wall where the velocity will always be zero when it has no slip enabled i am confused about you boundary conditions since you talk about a constant flow of 3.92E-5 kg/s somewhere but then also the equation with sin and \$Time but you cant both try a simple velocity inlet with the equation and a pressure outlet and rid the interface when that works maybe try periodic with the equation as the mass flow remember when you create an interface the original boundary settings are ignored whether it be a wall or inlet etc

Hi,

I went ahead and removed the periodic interfaces, set the outlet boundary to a pressure outlet. then i used the field function i created as my velocity at the inlet. And I finally got the oscillating flow I was looking for, so yay :) and thanks to you. However my surface average velocity at the inlet doesn't seem to be what i was expecting (please find the files attached). the sine curve doesn't form properly and I don't know why. I would like to thank you very much for your help in advance and I hope to hear from you soon.

I noticed my mistake, it was that I set up the report for surface averaged velocity magnitude instead of velocity in the x-axis direction. So please do not worry yourself with solving this issue.

 All times are GMT -4. The time now is 04:14.