- **OpenFOAM Programming & Development**
(*https://www.cfd-online.com/Forums/openfoam-programming-development/*)

- - **Empty/Dummy term for equations?**
(*https://www.cfd-online.com/Forums/openfoam-programming-development/96022-empty-dummy-term-equations.html*)

Empty/Dummy term for equations?Just at the moment I am struggling with switching on and off equations/equation terms within solvers.
Just removing one or two terms from an equation by way of "XEqn += ..." is straight forward and works nearly every time for me (the other times are typos). But sometimes it would be necessary to completely neutralise the equation without removing it from the solver as such. If I remove all of the equation terms, the compiler does what it must and complains/fails, because it cannot relax/solve an empty equation. Is there anything such as an empty/dummy term (e.g. fvc::dummy())? A term that would satisfy the compiler and the rest of the functions but that would just rewrite the values from the last iteration step without any alteration? Or if there is none: Who can help me building that dummy term? Thank you for your answers already in advance! |

Why don't you wrap an if statement around the equation?
But more interesting, what are you trying to achieve with this? Why do you want to neutralize an equation without removing it? |

All times are GMT -4. The time now is 08:08. |