CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Changing boundary condition Ux after fluid reaches a specific distance (https://www.cfd-online.com/Forums/openfoam-programming-development/222313-changing-boundary-condition-ux-after-fluid-reaches-specific-distance.html)

mcfdma November 19, 2019 05:23

Changing boundary condition Ux after fluid reaches a specific distance
 
Hello. I am working on filling the capillary with fluid.

The flow rate (Ux) is slow and the capillary is long which results in taking significant amount of time to fill the entire capillary.

Is there a way to speed up this process by initially setting the Ux to be high (higher than the value needed for the case) and once it reaches a particular distance in x coordinate, the Ux value is reduced automatically without me stopping the case and manually reducing the Ux and re-running it.

I have been looking at codedFixedValue but not sure.
Any help?

einstein_zee November 19, 2019 10:03

Hi there,

you may find this one useful https://www.cfd-online.com/Forums/pa...rnalfield.html

raumpolizei November 21, 2019 03:52

Hey
I don't know your specific case but this sounds like this could be estimated by hand. With codedFixedValue, you are on the right track. Based on what you wrote there are a few other options you may want to try out:
  1. GroovyBC - check if swak4foam is available for your OF version. You could prescribe a ramp for the inflow velocity.
  2. Also, depending on your domain, you may want to have a look at funkysetfields (also a swak4foam utility).
  3. This wont solve you problem but you could use a coarse mesh and run the case until you are reaching the state of interest. Or a bit before if the case is turbulent in order to allow turbulence to evolve. Map it to the fine mesh and continue your simulations (mapFields).
  4. Write a bash script for the whole case, including the velocity change (use foamDictionary and similar commands).
Good luck!
RP


All times are GMT -4. The time now is 03:00.