Double Array with 2 row and 2 column varibles

Pages: 12
@lastchance
Thanks very much.

Can you help in understanding the X Momentum Eq. source term while using UPWIND SCHEME?
I am using a code he has the following terms as source term, here B[k] is the source term.
https://imgur.com/a/frgt4Md.
This code applies only to boundaries.

Regards
usmannazir
Last edited on
Straight answer: no! It's the inner depths of somebody's CFD code.

Harder inspection, though ... don't do it like that! There is a matrix aP_u[][] which is incredibly sparse (should have 5 non-zero diagonals in 2d CFD). You DON'T store most of those elements because most of them are zero. If your CFD mesh had just 100x100 cells (which isn't that big) then you'd end up with a 10000x10000 matrix.

Also, I can't for the life of me see why it has aP_u[k][k+Ny] unless it is trying to do something with periodic boundary conditions.

And if it's using upwind differencing, as you say, no advection terms should end up in the source term.

Sorry, but I can't help you here. I think you would be better writing your own code, from a mathematical description of the problem that you understand.

(BTW - please don't put a full stop after your hyperlink; it gets absorbed into the hyperlink, which then ceases to work.)
Last edited on
Is it possible to have multiple possible solutions in the form of mathematical relations in CFD for the same case?
It's a nonlinear system, so yes, it's possible to have multiple solutions. I could show you in the lab open-channel flows with the same inflow and outflow constraints, but a different overall behaviour. You can also get bistable fluidic switches using the Coanda effect (tendency of a jet to be drawn toward a solid surface): if there are multiple alternatives it will essentially choose one at random and stick to it until the system is perturbed.

However, it would be rare, and for what you have described in this thread thus far it is unlikely. There are some flows which one would expect to be steady but are actually time-dependent because of an instability. Vortex shedding is a classic example: it's why tall chimneys often have helical strakes around them, to prevent in-phase oscillations over the whole height shaking the chimney to pieces.

It would depend what prompted your question.
Last edited on
Topic archived. No new replies allowed.
Pages: 12