Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
2

Error in Surface match using Surface measure from bcl and also using surface match tool in sketchup.

asked 2016-12-12 14:18:12 -0500

adhiraj03's avatar

updated 2017-08-05 07:37:33 -0500

I had to match internal surface of my model. 1)Firstly I used the surface match tool in sketch up and tired intersecting & matching the model. After i matched it. When i reloaded the model , an error message showed ( attached below)

2) Alternatively i used the surface measure from BCL in openstudio and error as " segementation" fault was showN ( ATTACHED)

Please find attached the errors and the open studio file.

image description image description

My OpenStudio File is here

I would really appreciate the help.

edit retag flag offensive close merge delete

Comments

1

There is an open issue about this. I can try and take a look at your model and see if I can figure out the problem surfaces. Is the model you are trying to use the measure on a clean copy that hasn't been intersected using the SketchUp Plugin?

David Goldwasser's avatar David Goldwasser  ( 2016-12-12 16:35:11 -0500 )edit

Yes. I am using the measure on a clean copy copy of model that hasnt been intersected using the sketch up plugin. Thank you. I will be looking forward to hear from you.

adhiraj03's avatar adhiraj03  ( 2016-12-12 16:55:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-12-12 18:29:22 -0500

updated 2016-12-12 19:26:48 -0500

I found some spaces that have overlapping geometry (see below). That should be fixed but that wasn't' causing the issue.

image description

So I created a custom version of the Surface Matching that only matched one pair of spaces at a time vs. all of the spaces at once. I expected it to fail but to identify problem surfaces, but it worked, just much more slowly. I'll show you that code below, but I can also email you file later, I don't have 1.13.0 on machine I'm at now.

While the matching worked, it isn't perfect, you will have some hand matching to do, but most of the surfaces matched.

image description

The plenum zones below are examples of some ceilings that didn't match. You can hand match using the SketchUp Inspector or the gridview of OpenStudio application. For this large of a model you may want to avoid gridview for surfaces. Using the OpenStudio inspector in SketchUp you can't change the boundary condition. Instead you identify the boundary condition object. Also related to the image below. The Surface Matching measure (and the native OpenStudio intersect method, doesn't intersect sub-surfaces. That is why the interior windows didn't work. You can remove those unless they are needed or create similar surfaces in the adjacent spaces).

image description

Lastly, as shown below the native OpenStudio intersect creates convex surfaces, which is why you see the faceted surfaces in some areas.

image description

Here is the full section of the run method. You can copy the Surface Matching measure and replace the run method with what is shown below.

def run(model, runner, user_arguments)
super(model, runner, user_arguments)

# matched surface counter
initialMatchedSurfaceCounter = 0
surfaces = model.getSurfaces
surfaces.each do |surface|
  if surface.outsideBoundaryCondition == "Surface"
    next if not surface.adjacentSurface.is_initialized # don't count as matched if boundary condition is right but no matched object
    initialMatchedSurfaceCounter += 1
  end
end

#reporting initial condition of model
runner.registerInitialCondition("The initial model has #{initialMatchedSurfaceCounter} matched surfaces.")

# for diagnostics looping through vector of each pair of spaces
model.getSpaces.sort.each do |space_a|
  model.getSpaces.sort.each do |space|
    runner.registerInfo("Intersecting and matching surfaces between #{space_a.name} and #{space.name}")
    puts "Intersecting and matching surfaces between #{space_a.name} and #{space.name}"
    spaces = OpenStudio::Model::SpaceVector.new
    spaces << space_a
    spaces << space
    OpenStudio::Model.intersectSurfaces(spaces)
    OpenStudio::Model.matchSurfaces(spaces)
  end
end

# matched surface counter
finalMatchedSurfaceCounter = 0
surfaces.each do |surface|
  if surface.outsideBoundaryCondition == "Surface"
    finalMatchedSurfaceCounter += 1
  end
end

#reporting final condition of model
runner.registerFinalCondition("The final model has #{finalMatchedSurfaceCounter} matched surfaces.")

return true
end # end of the run method
edit flag offensive delete link more

Comments

Thank you David . I had no clue what went wrong but many thanks for the help. Kindly send the fixed file when you can at : adhiraj.singh.chem@gmail.com. Thanks again.

adhiraj03's avatar adhiraj03  ( 2016-12-12 20:27:57 -0500 )edit

@ David Goldwasser : Hi Sir, I made a custom measure for surface matching with the above code included in place of the run method. I added this measure in the measure tab of open studio and then applied measure using the "apply measure" on top. However after some time : the " running measure tab" is freezing and not responding and also open studio is not responding.

I humbly request you send me the above file containing surface matched model to my email adhiraj.singh.chem@gmail.com .

Thanks Alot for your help.

adhiraj03's avatar adhiraj03  ( 2016-12-13 02:58:36 -0500 )edit
1

@adhiraj03, I just sent a 1.13.0 model. For reference it did take 10 minutes in the GUI to run, and it would appear locked up for that time. For anyone else looking at this later, if you run the measure test with this model it runs in about 1 minute.

David Goldwasser's avatar David Goldwasser  ( 2016-12-13 11:21:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2016-12-12 14:18:12 -0500

Seen: 574 times

Last updated: Jan 28 '17