CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Time-varying step function boundary condition (https://www.cfd-online.com/Forums/openfoam-pre-processing/244064-time-varying-step-function-boundary-condition.html)

letoppina July 20, 2022 03:36

Time-varying step function boundary condition
 
Hello,

Is there a way to impose a squared (or trapezoidal) velocity profile (on the boundary condition of my fluid) instead of a simple sinusoidal shape?

I am using OpenFOAM version 6 and chtmultiregionfoam solver.

Thank you

olesen July 21, 2022 09:06

Quote:

Originally Posted by letoppina (Post 832049)
Hello,

Is there a way to impose a squared (or trapezoidal) velocity profile (on the boundary condition of my fluid) instead of a simple sinusoidal shape?

I am using OpenFOAM version 6 and chtmultiregionfoam solver.

Thank you


Doesn't exactly fit your question, but openfoam6 is also pretty old. If you pick up something like the newest OpenFOAM-v2206 or OpenFOAM-v2112 etc, they have a pre-defined square wave function that even supports having a different length on vs off period. Other alternatives would be an expression function with your own intervals. If none of these work for you, can also just specify a table of values. It does mean that you essentially need to specify the switching points twice (eg, off until 1.0, on after 1.00001 etc) but could be the path of least resistance for you at the moment.



https://www.openfoam.com/documentati...e.html#details


All times are GMT -4. The time now is 17:15.