plv.dat CGS -> MGS

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Charlie Bright
Posts: 30
Joined: Mon Jan 27, 2020 3:49 am

plv.dat CGS -> MGS

Post by Charlie Bright » Wed Sep 09, 2020 7:09 am

Dear SimVascular Dev Team,

I am converting the inputs of my simulation from CGS units to MGS - density, viscosity, inflow BC, resistance and capacitance values.
However, I am using the plv.dat file from the coronary normal example for the coronary outlets and I was wondering what the units are in this file?
Will they also need to be scaled to properly function in an MGS system?

Thanks in advance,
Charlie

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

Re: plv.dat CGS -> MGS

Post by David Parker » Wed Sep 09, 2020 11:11 am

Hi Charlie,

The plv.dat file units are dyne/cm^2 so you will need to convert the values to Pa.

Cheers,
Dave

User avatar
Charlie Bright
Posts: 30
Joined: Mon Jan 27, 2020 3:49 am

Re: plv.dat CGS -> MGS

Post by Charlie Bright » Thu Sep 10, 2020 2:17 am

Hi Dave,

Perfect thank you.
Just to check though, on the flow solver documentation it says MGS uses millimeters.
So instead of Pa I was just going to convert directly to dyne/mm^2.

Density: g/cm^3 --> g/mm^3
Viscosity: g/cm^1.s^1 --> g/mm^1.s^1
Resistance: dyne.s/cm^5 --> dyne.s/mm^5
Compliance: cm^5/dyne --> mm^5/dyne
Inflow: cm^3/s --> mm^3.s
PLV: dyne/cm^2 --> dyne/mm^2

Is that the right way to go about it?
Thanks,
Charlie

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

Re: plv.dat CGS -> MGS

Post by David Parker » Thu Sep 10, 2020 1:29 pm

Hi Charlie,

That's correct, just need to scale the simulation values so that they are consistent with each other and with your model.

Make sure to set Sim Units to mm when converting results.

Cheers,
Dave

User avatar
Charlie Bright
Posts: 30
Joined: Mon Jan 27, 2020 3:49 am

Re: plv.dat CGS -> MGS

Post by Charlie Bright » Fri Sep 11, 2020 1:34 am

Hi Dave,

Shall do, cheers for the heads up. :)

Charlie

User avatar
Charlie Bright
Posts: 30
Joined: Mon Jan 27, 2020 3:49 am

Re: plv.dat CGS -> MGS

Post by Charlie Bright » Wed Sep 16, 2020 6:08 am

Hi Dave,

Can you help me confirm the converted results units please?
- I ran a steady flow analysis.
- The inlet surface BC was a prescribed velocity and all of the outlets were 0 resistance.
- All of the inputs were converted into mm and I had mm selected when converting the results.

When I look output folder for the converted results I see 2 text files:
- all_results-averages.txt (1)
- all_results-averages-from-cm-to-mmHg-L_per_min.txt (2)
I was a little confused by the name "cm-to-..." rather than "mm-to-...", but maybe this just needs fixing in code.
I compared the data to see if I could spot the units of (1) from (2).

Flow rate, Q:
The conversion between them is 0.00006 * (1) = (2).
So the units in (1) look to be mm^3/s and (2) is L/min.

Pressure, P:
The conversion is 0.0075 * (1) = (2)
So the units of (1) appear to be in Pa whilst pressure in (2) is in mmHg.

However, having ran the simulation in mm units I would have expected the pressure readings to be in the unit dyne/mm^2 rather than SI.
When I convert the results as a single file and compare the scale of the data for 'Pressure_avg' & 'Pressure_avg_mmHg' the same conversion is there.
Does this mean that the plv.dat file previously mentioned should be Pa too?

To check the velocity unit:
The flow file for the inlet was a volumetric flow rate of 512,703 mm^3/s.
The area of the inlet face is 734.695 mm^2.
So I should be expecting an inlet velocity at the face of 512703/734.695 = 697.845 mm/s. Roughly 700.
The velocity magnitude for the bct.vtp in ParaView shows a max velocity of 1400 units.
I've no slip walls and had a parabolic flow profile so I assume the 700 mm/s is an average over the inlet face, hence the peak velocity must be greater to make up for 0 velocity at the walls.
So I assume the unit for the 1400 is also mm/s?

Are you able to confirm the units of the other output metrics please (if everything is setup in the mm scale)?

Thanks,
Charlie

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

Re: plv.dat CGS -> MGS

Post by David Parker » Wed Sep 16, 2020 4:52 pm

Hi Charlie,

The all_results-averages-from_cm-to-mmHg-L_per_min.txt file has cm in the name regardless of the units selected from Sim Units in the GUI; this is a bug. Note that the other .txt files are not converted to Sim Units units.

The scaling factor used by SV to convert pressure to mmHg for mm units is wrong, should be 0.0750, not 0.00750. The flow conversion is correct.

I will open an Issue for this.

The velocity is an average over the face, with units consistent with the other physical parameters, so they are mm/s.

Cheers,
Dave

User avatar
Charlie Bright
Posts: 30
Joined: Mon Jan 27, 2020 3:49 am

Re: plv.dat CGS -> MGS

Post by Charlie Bright » Thu Sep 17, 2020 12:27 am

Hi Dave,

Perfect, thanks for clearing that up.

Charlie

POST REPLY