Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
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.
Solved! Go to Solution.
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.
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?
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.
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.
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.
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
https://community.ptc.com/t5/PTC-Mathcad-Questions/3D-data-fit/m-p/478697
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.
If you look at the values in your tables
I think your interpolation problems just got a whole lot simpler.
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.
Yeah sorry I needed to clarify that. I am only using the wind speed 110 mph. The rest I am ignoring.
My point was that each column (except for the first one and the first element of each column) is constant. So for any slope but the first and any zone but the first the value for a zone is independent of slope.
So you need to treat zone 1, but for zones 2 thru 5 you only need to interpolate on height.
wrote:
Yeah sorry I needed to clarify that. I am only using the wind speed 110 mph. The rest I am ignoring.
Too late, I was just about to prepare a sheet with a subset of the necessary values to demonstrate in more detail what I was talking about. If you don't need other velocities you would set up the matrices differently. Only 10 8x7 matrices and using 2D interpolation 10 times.
Furthermore I also noticed that you have a lot of constant values in your tables. You may use this to simplify the calculation as Fred suggested. You just provided data for heights from 15 to 40 and are missing the values for heights from 50 to 80 from the full table (or do you ignore those heights, too?).
For whatever it may be worth now here is what I had prepared.
Its just one of the 10 3D-tables (only for Load case 1 and Zone 2) and I did not use the full range for heights and velocities.
Look at the attached sheet, maybe you find something you can use.
For the values you used for data_clz2 where exactly did you get them from the table. I know its for case 1 and zone 2 but I am lost as towards what heights and wind speeds specifically they're from.
As for the other heights, yeah I am not going to be using them just because for my scope of work many of my projects are not past that height so I was trying to save time and input everything. Same thing for wind speed the other's do not apply to my state.
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.
This is some very complex stuff to comprehend. But it works and it is much simpler than what I was doing before. Thanks!
Hi,
Create a function you can use over and over again B=7