Skip to content

Commit

Permalink
Added flow rate and velocity at port level
Browse files Browse the repository at this point in the history
  • Loading branch information
alikucukavci committed Oct 27, 2022
1 parent 618c032 commit 37a0db3
Show file tree
Hide file tree
Showing 10 changed files with 418 additions and 131 deletions.
Binary file modified PostRequestTest/.vs/PostRequestTest/v16/.suo
Binary file not shown.
Binary file modified RevitToRDFConverter/.vs/RevitToRDFConverter/v16/.suo
Binary file not shown.
24 changes: 12 additions & 12 deletions RevitToRDFConverter/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ Result IExternalCommand.Execute(ExternalCommandData commandData, ref string mess
{
//Angle
string angleID = System.Guid.NewGuid().ToString().Replace(' ', '-'); ;
double angleValue = UnitUtils.ConvertFromInternalUnits(component.LookupParameter("Angle").AsDouble(), UnitTypeId.Pascals);
double angleValue = UnitUtils.ConvertFromInternalUnits(component.LookupParameter("Angle").AsDouble(), UnitTypeId.Degrees);
sb.Append($"inst:{componentID} fpo:angle inst:{angleID} ." + "\n"
+ $"inst:{angleID} a fpo:Angle ." + "\n"
+ $"inst:{angleID} fpo:value '{angleValue}'^^xsd:double ." + "\n"
Expand Down Expand Up @@ -692,22 +692,22 @@ Result IExternalCommand.Execute(ExternalCommandData commandData, ref string mess

//Fictive pressureDrop
string pressureDropID = System.Guid.NewGuid().ToString().Replace(' ', '-'); ;
double pressureDropValue = 0;
double pressureDropValue = 5;
sb.Append($"inst:{connectorID} fpo:pressureDrop inst:{pressureDropID} ." + "\n"
+ $"inst:{pressureDropID} a fpo:PressureDrop ." + "\n"
+ $"inst:{pressureDropID} fpo:value '{pressureDropValue}'^^xsd:double ." + "\n"
+ $"inst:{pressureDropID} fpo:unit 'Pascal'^^xsd:string ." + "\n");

if (component.LookupParameter("Flow") != null)
{
//Flow rate
string flowID = System.Guid.NewGuid().ToString().Replace(' ', '-');
double flowValue = UnitUtils.ConvertFromInternalUnits(component.LookupParameter("Flow").AsDouble(), UnitTypeId.LitersPerSecond);
sb.Append($"inst:{connectorID} fpo:flowRate inst:{flowID} ." + "\n"
+ $"inst:{flowID} a fpo:FlowRate ." + "\n"
+ $"inst:{flowID} fpo:value '{flowValue}'^^xsd:double ." + "\n"
+ $"inst:{flowID} fpo:unit 'Liters per second'^^xsd:string ." + "\n");
}
//if (component.LookupParameter("Flow") != null)
//{
// //Flow rate
// string flowID = System.Guid.NewGuid().ToString().Replace(' ', '-');
// double flowValue = UnitUtils.ConvertFromInternalUnits(component.LookupParameter("Flow").AsDouble(), UnitTypeId.LitersPerSecond);
// sb.Append($"inst:{connectorID} fpo:flowRate inst:{flowID} ." + "\n"
// + $"inst:{flowID} a fpo:FlowRate ." + "\n"
// + $"inst:{flowID} fpo:value '{flowValue}'^^xsd:double ." + "\n"
// + $"inst:{flowID} fpo:unit 'Liters per second'^^xsd:string ." + "\n");
//}



Expand Down
356 changes: 237 additions & 119 deletions RevitToRDFConverter/RelatedPorts.cs

Large diffs are not rendered by default.

Binary file modified RevitToRDFConverter/bin/Debug/RevitToRDFConverter.dll
Binary file not shown.
Binary file modified RevitToRDFConverter/bin/Debug/RevitToRDFConverter.pdb
Binary file not shown.
Binary file not shown.
Binary file modified RevitToRDFConverter/obj/Debug/RevitToRDFConverter.dll
Binary file not shown.
Binary file modified RevitToRDFConverter/obj/Debug/RevitToRDFConverter.pdb
Binary file not shown.
169 changes: 169 additions & 0 deletions triples/test.ttl

Large diffs are not rendered by default.

0 comments on commit 37a0db3

Please sign in to comment.