WSS calculations directly from SimVascular

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Atefeh Razavi
Posts: 23
Joined: Sun Mar 04, 2018 10:47 am

WSS calculations directly from SimVascular

Post by Atefeh Razavi » Mon May 13, 2019 10:27 am

Hello,

I was wondering to know how I may extract (calculate) WSS values directly from SimVascular not Paraview.

Thank you and looking forward to your reply,
Ati

User avatar
David Parker
Posts: 142
Joined: Tue Aug 23, 2005 2:43 pm

Re: WSS calculations directly from SimVascular

Post by David Parker » Mon May 13, 2019 4:19 pm

Hi Ati,

WSS is calculated from the simulation results using the svPost program, which is part of the svSolver programs. You could have a look at the source code to see how the values are calculated (see https://github.com/SimVascular/svSolver ... ver/svPost).

Cheers,
Dave

User avatar
Atefeh Razavi
Posts: 23
Joined: Sun Mar 04, 2018 10:47 am

Re: WSS calculations directly from SimVascular

Post by Atefeh Razavi » Thu May 16, 2019 9:49 am

Hi Dave!

I looked at the code, however due to high number of variables, I did not figure out which variables were used to calculate WSS.
As defined, WSS is the velocity derived tangential stress. I was interested to see if I can calculate WSS from the velocity as well as the normal to the cell and then compare it with the WSS values given in Paraview.

Thanks,
Atefeh

User avatar
David Parker
Posts: 142
Joined: Tue Aug 23, 2005 2:43 pm

Re: WSS calculations directly from SimVascular

Post by David Parker » Thu May 16, 2019 10:33 am

Hi Atefeh,

Sorry, I mislead you! The WSS calculation is actually done in the solver in solver_subroutines.f at line 1667:

Code: Select all

         
         rtmp = zero
         wallssVec  = zero

         do i=1, numnp
            if (invflx(i) .ne. 0) then
               rtmp(i,2:4) = flxres(i,1:3) !viscous flux
c     calculate the WSS
               tn = flxres(i,1) * flxnrm(i,1)
     &            + flxres(i,2) * flxnrm(i,2)
     &            + flxres(i,3) * flxnrm(i,3)

                wallssVec(i,1) = flxres(i,1) - tn * flxnrm(i,1)
                wallssVec(i,2) = flxres(i,2) - tn * flxnrm(i,2)
                wallssVec(i,3) = flxres(i,3) - tn * flxnrm(i,3)
            endif
         enddo
where flxnrm is the outward normal and flxres is the viscous flux.

Cheers,
Dave

POST REPLY