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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Splitting of layers

TikkaMasala
11-Garnet

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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
MikeArmstrong
5-Regular Member
(To:TikkaMasala)

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!?

MikeArmstrong
5-Regular Member
(To:Werner_E)

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.

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.

MikeArmstrong
5-Regular Member
(To:Werner_E)

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 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.

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!

Top Tags