firemodels / fds

Fire Dynamics Simulator
https://pages.nist.gov/fds-smv/
Other
636 stars 613 forks source link

questions about evac.f90 #2064

Closed gforney closed 9 years ago

gforney commented 9 years ago
Please complete the following lines...

FDS Version:6.0.1
SVN Revision Number:17534
Compile Date:
Smokeview Version/Revision:6.1.5
Operating System:win7 32 

Describe details of the issue below:
hi,Timo
I have read evac.f90,there is something I can't really understand .

IF(GUARD_MEN == 1) THEN
             CALL GUARD(NM, XI, YJ, WSPA, WSPB, TARGET_X, TARGET_Y)
             UBAR = WSPA 
             VBAR = WSPB
             EVEL = SQRT(UBAR**2 + VBAR**2)
             UBAR = UBAR/EVEL ; VBAR = VBAR/EVEL
          ELSE
             CALL FIND_PREFERRED_DIRECTION(I, N, T+DTSP_NEW, T_BEGIN, L_DEAD,     
              NM_STRS_MESH, &
                  IIN, JJN, IIX, JJY, XI, YJ, ZK, UBAR, VBAR, HR_TAU, TPRE, NM, I_STRS_DOOR,
HR_SPEED)
          END IF
EVEL = UBAR**2 + VBAR**2

In my understanding,EVEL is the velocity UBAR and VBAR is the x,y plane projection
velocities.
But in IF module,EVEL = SQRT(UBAR**2 + VBAR**2),after that EVEL = UBAR**2 + VBAR**2

I am confused 
Do you mind give me your msn or ICQ or skype number?
My email :1195439247@qq.com

Original issue reported on code.google.com by dlmuSword on 2014-02-28 03:25:46

gforney commented 9 years ago
Timo,

Please have a look.  Thanks.

Original issue reported on code.google.com by randy.mcdermott on 2014-02-28 13:17:56

gforney commented 9 years ago
Well, the guard_men is on obsolote feature that was never finnished.
So, the commands inside the if-statement true branch are not used.

But the source should be correct. The EVEL is just a temporary variable
that is used in many different places. The lines:

             UBAR = WSPA 
             VBAR = WSPB
             EVEL = SQRT(UBAR**2 + VBAR**2)
             UBAR = UBAR/EVEL ; VBAR = VBAR/EVEL

make sure that the UBAR,VBAR is an unit vector (the direction of
the prefered walking velocity).

After the if-statement:

EVEL = UBAR**2 + VBAR**2

is used in the if-test: EVEL >= TWO_EPSILON_EB

Here it is just tested that the velocity v0_i, whose components
are ubar and vbar, is not a zero vector (i.e., the agent does
not have any preferred walking velocity). Well, I could have
taken the square root, but square root takes much cpu seconds
to compute, so I test the square. Well, modern compilers could
have optimized this automatically, perhaps.

UBAR and VBAR are the components of an unit vector (or both zeros)
that give the preferred walking direction in a (x,y) plane.

Wbr,
Timo

Original issue reported on code.google.com by tkorhon1 on 2014-03-03 14:40:57

gforney commented 9 years ago
thank you Timo

In the code 
F_X,F_Y denote the social+contact forces in the x,y direction separately

          U_NEW = HR%U + 0.5_EB*HR%F_X*DTSP/HR%MASS
          V_NEW = HR%V + 0.5_EB*HR%F_Y*DTSP/HR%MASS
this is the velocity that calculated by the forces

          X1 = HR%X + U_NEW*DTSP
          Y1 = HR%Y + V_NEW*DTSP
this is the new coordinates are calculated using the new velocities

I think X1-HR%X is a vector,if F_X,F_Y are vector quantities too

Original issue reported on code.google.com by dlmuSword on 2014-03-05 08:15:12

tkorhon1 commented 9 years ago

I'll close this one. TimoK