|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Koustubh Bhagat
Join Date: Mar 2019
Posts: 2
Rep Power: 0 ![]() |
Hello,
I have just started writing small codes to simulate CFD problems just to get a gist of it. I have a question. Why should velocity be initialized such that continuity equation is solved? I mean it does sound obvious that continuity equation should be satisfied but what if I don't initialize velocity to so that continuity equation is satisfied? I tried doing it. The solution did converge but I got different results for both the cases. I have attached the problem and the MATLAB code I wrote. I haven't used the initialization values they have suggested though. Thank you in advance. My MATLAB code: u=[1 3]; p2c=10; p2=0; epsilon=0.001; error=1; ma=u(1)*3; mb=u(2)*1; e=[10 10] while abs(p2c)>0.001 old=u; ma=u(1)*3; mb=u(2)*1; u(1)=(3/ma)*(28-p2); u(2)=ma/mb*u(1) + p2/mb; u p2c=(3*u(1) - u(2))/((1/mb)+(9/ma)); p2c u(1)=u(1) -3*p2c/ma; u(2)=u(2) + p2c/mb; p2=p2 + p2c; u end |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Radiation in semi-transparent media with surface-to-surface model? | mpeppels | CFX | 11 | August 22, 2019 08:30 |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
How to use "translation" in solidBodyMotionFunction in OpenFOAM | rupesh_w | OpenFOAM Running, Solving & CFD | 5 | August 16, 2016 05:27 |
Udf for moving heat flux in 2D cylindrical geometry | devia21 | Fluent UDF and Scheme Programming | 0 | April 20, 2015 01:27 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |