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

- - **solve continiuty for velocity**
(*https://www.cfd-online.com/Forums/openfoam-programming-development/89964-solve-continiuty-velocity.html*)

solve continiuty for velocityHi Foamers,
in compressible solvers continuity is solved for density: Code:
`solve(fvm::ddt(rho) + fvc::div(phi));` But how can I solve continuity for velocity? I already tried to solve: Code:
` fvScalarMatrix UEqn` Quote:
Code:
`fvScalarMatrix UEqn` Quote:
Code:
` fvScalarMatrix UEqn` Quote:
Code:
`fvScalarMatrix UEqn` Quote:
Code:
`fvVectorMatrix UEqn` Quote:
Best, |

I'm a little bit confused:
thus I am looking for a volVectorField U, my system of equations should be fvVectorMatrix. But the continuity equation is a scalar one and the term div(rho,U) is a scalar field. So for each cell I have 3x unknowns but only 1x equation, right? On the other hand, it should be possible to obtain continuity-based velocities in 1D. How can it be implemented, if I want to start with an 1D-case? Furthermore, if I prescribe the temporal density change for each cell and provide velocities for every boundary cell but one, only one velocity field is possible, that satisfies these conditions, am I right? So how this velocity field can be obtained? |

Thank you Felix,
to treat the velocity as scalar is a great idea! |

One more question Felix,
which boundary condition would you suggest for velocity for the open end, since no boundary condition is needed? In 1D, one velocity and known density changes are fully sufficient. Otherwise the system of equations is overdetermined. Is there any "no condition" boundary in OF? |

I was thinking about it for a bit and I don't think it would make sense doing this with OpenFOAM.
If you know and you want to solve for , the 1D continuity equation simply becomes an ODE. So unless you don't have any other PDEs coupled with the continuity equation, it would make much more sense solving this equation using an ODE solver and not with finite volume methods. What's your intention, anyway, if I may ask? Greetings, Felix. |

Thanks again Felix,
Well, I also have PDEs for enthalpy and components to solve. And the intention is to test, if diffusive heat and mass transfer as well as evaporation models are working in 1D, before adding the momentum equation. That's the background. |

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