cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

SOLVED

## Interpolation

I am trying to code ASCE7-10 table 27.6-2 to find my wind pressure of my roof but it is based on different parameters like the slope and the height and the wind speed.

Is there a way I can interpolate a table instead of having to do a bunch of matrices and interpolate each individually to find the pressure?  The image below is what i am trying to avoid, doing a bunch of matrices to then get the final answer. 1 ACCEPTED SOLUTION

Accepted Solutions

## Re: Interpolation

The values in data_clz2 were taken from the picture of the table you posted.

First rows are corresponding to 30 ft and second row to 40 ft

Columns correspond to speed 110, 115, 120 and for every slope there is its own 2x3 matrix.

As written earlier this is my attempt to simulate a 3-dimensional matrix which MC unfortunately does not support.

But as you are only interested in speed 110 mph a simple 2D interpolation is all it takes. And as you are not interested in heights greater than 40, the attached approach which uses the data matrices you provided should do the job.

15 REPLIES 15

## Re: Interpolation

Is there a way I can interpolate a table instead of having to do a bunch of matrices and interpolate each individually to find the pressure?

You would have to provide the table and explain what exactly you need as answer. Do you need 9 values for every ratio L/B or is it a simple 2D table interpolation you are looking for?

## Re: Interpolation

This is the table I am trying to input.  I have already defined what the wind speed and height of the building and slope of roof is so from there I want it to spit out the different pressures for the zones. ## Re: Interpolation

So the input is height, slope and speed. But I also see loadcase which can be 1 or 2. You will have to provide that, too. this would make up for a 4-dimensional table.It would be quite possible to interpolate for any of those four input values, but unfortunately Mathcad does not support multidimensional arrays and so we would have to use some kind of artificial data structure.

The output should be a vector with 5 values - is this correct?

In your screenshot you calculated 9 values, not just 5, and load case could even be 0,5 in some cases??

I also see no connection between the values you provide in the screen shot and in the table you posted!?

I would have guessed that you want to interpolate between heights, speeds and slopes. maybe even between zones and load cases.

It should be possible to create a function which gives you the interpolated value for height=37 ft, wind speed = 17 mph, slope=24 deg and zone=3.2 with loadcase=2. But is sure would be quite some work to create the necessary tables in Mathcad format.

## Re: Interpolation

Hi,

Create a function you can use over and over again B=7 ## Re: Interpolation

1.  So the load-cases need to be both so I would need to have my output be a transpose vector.

2. Yes that is correct,  but it would be ten values because each zone has two values to analyze.

3.  As for the connection between the two images, there is none.  I was trying to show what I am trying to avoid.  The method terryhendicott stated below is what I had been doing for these tables but it's too time consuming and takes up a lot of space.  I have to first create a relationship between each zone and slope individually and interpolate for each zone based on one hiehgt only.  From there create a relationship between the interpolated values of the slope and zone for each height from the table and the actual height of my building to get the final output of what my pressure is for all 5 zones.  I wanted to know if there was an easier way for it to analyze the table.

## Re: Interpolation

Ok, as i understand it now, you have three input values: height, slope and velocity. All three values should not be restricted to the tabled values (40,30,15), (2/12, 3/12, ...) and (110, 15,120,..) but can be any values within a certain range. Therefor we need 3D-interplation.

The output should be the 10 values for each of the 5 zones and the 2 Load cases.

Maybe arranged in a nested vector (a 5 element vector and each element is a vector with two elements) or a 2 x 5 matrix.

There is no interpolation between zones or Load cases necessary. That means there never can be a Load case 1.7 or a zone 3.8.

Its sure a lot of work to get the whole Table 27.6-2 into matrices in mathcad. Did you already transferred the table in some way you could provide as a mathcad sheet?

There sure are quite different methods to approach the task.

I would create a single 3D-interplation for every combination of Zone and Load Case, making up 10 interpolations. A user defined function would then call those interpolations and create the necessary data structure with the 10 values.

Each single 3D-interpolation would need a data structure which is a three-dimensional array. As mathcad does not support this we would have to work around that limitation, by creating a  vector with 7 elements for each slope in the table and the elements of this vector would be matrices with the corresponding values for height and velocity. Using this data structure its easy to do multiple interpolations to extract a value for any given height,velocity and slope. I had posted a couple of times a file with routines for doing 3D-interplations that way.

We would now have to use that kind of interpolation 10 times, each with its own set of data, derived from the 27.6.-2 table.

Most work sure would be to type in the correct values from the table.

The routine for 3D-interpolation using a data structure as described above is quite short and can be found in some past threads, e.g.

or here

## Re: Interpolation

So these are the tables I have.  I dont know how to unite the table into one for both cases so i split them into p.r.C1 and p.r.C2... But i am still not understanding where I go from here.

## Re: Interpolation

If you look at the values in your tables I think your interpolation problems just got a whole lot simpler.

## Re: Interpolation

As far as I see this is just a small subset of the table 27.6-2 showing the values just for velocity 110 mph, right?

Thats not the format I had described above.

The table 27.6.-2 consists of 8 different heights from 15 to 80 ft, 9 different velocities from 110 to 200 mph und 7 different slopes. And for each combination of height, velocity and slope we have 10 values (2 cases times 10 zones).

What I had in mind were 70 different tables in 10 groups à 7 tables.

Each of the 10 groups would correspond to the 10 combinations of case and zone.

Here every of the 7 tables would correspond to one of the 7 slopes and the tables would be 8 x 9 matrices (rows would denote height and columns velocity.

I would then combine the 7  8x9 matrices to a vector and use this vector to calculate the value for a given triple (slope, height,  velocity) for a given set of loadcase and zone.

Doing this 10 times gives you the 10 values you are looking for.