SUGAR BEET CLAMP CFD MODELLING: SWAPPING INLET AND OUTLET
OpenFoam version: 9
Solvers: clampPimpleFoam (v5), pimpleFoam
I’m not sure if this is the most elegant solution available within the OpenFoam environment, but to swap the inlet and outlet, simply, two different geometries are used. When the air is flowing left-to-right (ltr), the geometry with the inlet on the left is used, and when the flow is right-to-left (rtl), the second geometry is used. This system runs in a loop of 15 minutes of simulation with two sub-cases. The pressure (p) and velocity (U) fields are first solved in sub-case 1, and then passed as fixed fields to the temperature (T) solver sub-case. In each of these sub-cases, two sub-sub-cases are set up with the two (ltr and rtl) geometries. The X dimension of the U inlet boundary condition is then evaluated as either positive (ltr) or negative (rtl), and then relevant sub-sub-cases employed. This “ltr” or “rtl” is evaluated at the start of ever 15 minute loop.
There was also an issue with some p and U fields diverging when pimpleFoam was run. This was fixed by running pimpleFoam for 1 second with a fixed dt of 0.002 seconds, then swapping to a variable dt for the next 89 seconds. maxCo was also reduced to 0.6 (from 0.8).
As a schematic, and including the solving of the temperature (T) fields:
Below are two animations covering a 43.5 hour period. The top animation is temperature of the beets (Ts), and the second is the velocity field (U). The inlet and outlet don’t swap until in the second half of the animation – this is best seen in the animation of the U field where the wind shadow swaps sides.
THE ANIMATIONS ARE SUPER FAST – I RECOMMEND YOU CHANGE THE PLAYBACK SPEED TO 0.25 (UNTIL I FIX THIS).