CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   implementing time varying boundary condition (https://www.cfd-online.com/Forums/openfoam-solving/242666-implementing-time-varying-boundary-condition.html)

EricS May 4, 2022 08:38

implementing time varying boundary condition
 
Hi Foamers,


I'm trying to implement a time-varying boundary condition and, so far, I tried it using codeStream. After some initial issues, I figured out how to properly write the code but, it seems to me, that codeStream compiles the new boundary condition before starting the cycle and then it uses it for every following timestep.
I'm wondering if there's a way to "tell" codeStream to recompile that boundary condition at each time-step!


P.S. I would prefer to avoid external tools as swak4foam for two simple reasons: first, I tried but I wasn't able to compile it for the linux release I'm working on (OpenSUSE), then, I should run those simulation on an external computer where I'm not the root user and I'm not allowed to compile external things...


Thank you in advance!

al.csc May 4, 2022 19:03

What about a simple table?
https://www.cfd-online.com/Forums/op...ent-value.html

EricS May 5, 2022 03:43

Sadly my boundary condition is related to the solution of the previous step, so I can't tell the values that I need to impose a priori... In a few words: I impose a mass flow, then I calculate the pressure difference between two points and I use this resulting value to correct the massflow for the next iteration!


All times are GMT -4. The time now is 05:35.