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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Splitting of layers

TikkaMasala
12-Amethyst

Splitting of layers

Hi all

I'm trying to make a small computation program that would split a thicker layers

into thinner ones and would put the split layers into one column.

In the attached computation sheet I have demonstrated what I would like to find first for a one layer system, then for a 2 layer system, but

the problem is that I haven't been able to make it work for n -layered system.

Thanks for your advices.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:TikkaMasala)

See if the attached file helps.

IMHO functions, like I provide, are more useful than static calculations, but you sure can easily turn my function into a simple one-time calculation if you insist.

@Mike: Did you post the wrong file? I can't see any solution or any function in the sheet you posted.

View solution in original post

11 REPLIES 11

If we work look at the first fucntion is this what you were looking for?

Message was edited by: Mike Armstrong

Message was edited by: Mike Armstrong

I still don't see the solution of yours!?

I must have had a moment this morning.

I have only developed one function (h.tot_j_layers_1) because I was not sure what Matti wanted.

I have only developed one function (h.tot_j_layers_1) because I was not sure what Matti wanted.

Ah, I see. We interpreted Matti's question differently. I haven't looke below his solution for the two layer system as I assumed that all that mess is just a couple of unsuccessful attempts. As the routine is supposed to work with an arbitrary number of base layers I guess the approach using if-statements is not that suitable for the problem.

Werner_E
25-Diamond I
(To:TikkaMasala)

See if the attached file helps.

IMHO functions, like I provide, are more useful than static calculations, but you sure can easily turn my function into a simple one-time calculation if you insist.

@Mike: Did you post the wrong file? I can't see any solution or any function in the sheet you posted.

Werner Exinger wrote:

@Mike: Did you post the wrong file? I can't see any solution or any function in the sheet you posted.

Yes my mistake. I have edited my original post.

Hi Werner, your answer was correct, but I must admit I don't yet fully understand your efficient programming.

For Mike, I updated my original posting with the programming you had added to your file and

made a simple program for an additional layer.

Werner or Mike, could you advice how this new 4 layers system could be turned into n-layers system.

If it is not easy, I'm happy what Werner provided and try to understand that code.

Werner_E
25-Diamond I
(To:TikkaMasala)

Werner or Mike, could you advice how this new 4 layers system could be turned into n-layers system.

If it is not easy, I'm happy what Werner provided and try to understand that code.

Whats new here? Unless I am missing something thats the very same problem as before. My routine works for as many layers you provide, just give it a try.

Yes, you are right. I'll study your code more carefully.

Werner_E
25-Diamond I
(To:TikkaMasala)

matti meili wrote:

Yes, you are right. I'll study your code more carefully.

Maybe it helps if the routine is written that way. The creation of the vector h should be clearer, the names of the control variables may be more meaningful and the inefficient, unnecessary multiple calculation of the sublayer depths is avoided:

1.png

An even better approach would be to make the routine dependend on the differences of the depths, the actual thicknesses of the layers (z.i).

2.png

Thanks a lot!

Announcements

Top Tags