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

6-Contributor

## Cannot calculate an improper integral when the independent variables are matrix column

Hello to all,

I am trying to solve an improper integral where the variables after integration are matrices 1xn. if I calculate the integral for just one individual components, the integral calculation will work.

if I try to calculate to obtain all the points it will not.

Due to the amount of variables references that are associated with the integrand, I put here a pdf file showing that is happening.

and the error that appears on the one with the column matrix is "Encountered a function error.

Regards,

Rogelio

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:rdelascasas)

I was able to make the integral array evaluate symbolically but it is a bit tricky and you might consider using an integral from 0 to 10^3 (or any appropriate high upper value) and evaluate it numerically.

at the top of page, because the symbolics don't know anything about units like degree and it helps the symbolics to evaluate the expressions without thinking that deg is an unknown variable.

2) I added a dummy line in the expression where Ea is calculated. This ensures that the symbolic evaluation is done inside this "program". I also added the "simplify" command:

We cannot use vectorization because the five vectors are not of the same size.

3) Ea still is not an array of true numerical values but we can turn it numerical by reassigning and numerically evaluating the array:

Now we are done and Ea is a normal array of numerical complex values:

10 REPLIES 10
24-Ruby V
(To:rdelascasas)

Try to vectorize the function call to Zpa. But then d should be the sam size size as the other vectors!

But its hard to debug a picture! We don't see what the exact error message is. We cannot trace back the error. We don't see if the integral/function works with other single value, we don't see what R1, gamma etc are,l dont see the difference between R1 and R2 or R3 (where it seems to work),   ...

Why don't you post the worksheet?

24-Ruby III
(To:rdelascasas)

6-Contributor
(To:rdelascasas)

one of the issues is that the R1 vector is the vector that calculate the distance between the pipeline segments and the power line phases segments. the pipeline and powerline components in the column vectors have to have an extra element than R1 to be able to calculate the distance between them, I think.

rogelio

6-Contributor
(To:rdelascasas)

the variable definitions are at the beginning of the file and the integral is in page 10.

Rs are distances between pipeline and each of the powerline phases.

h is the depth of the pipeline

h3s are the height of the powerline phases.

cos is the cosine between the pipeline segments and the powerline segments.

24-Ruby V
(To:rdelascasas)

I was able to make the integral array evaluate symbolically but it is a bit tricky and you might consider using an integral from 0 to 10^3 (or any appropriate high upper value) and evaluate it numerically.

at the top of page, because the symbolics don't know anything about units like degree and it helps the symbolics to evaluate the expressions without thinking that deg is an unknown variable.

2) I added a dummy line in the expression where Ea is calculated. This ensures that the symbolic evaluation is done inside this "program". I also added the "simplify" command:

We cannot use vectorization because the five vectors are not of the same size.

3) Ea still is not an array of true numerical values but we can turn it numerical by reassigning and numerically evaluating the array:

Now we are done and Ea is a normal array of numerical complex values:

6-Contributor
(To:Werner_E)

Good Morning Werner,

I was able to apply your method and it works very well.

Now, I changed the vectors information to compare the results with another file, where the pipeline and powerline are always in parallel. I am doing this because I noticed that when I was adding each component of the electric field per each phase and calculating the absolute value that is what I need to keep down to calculate the pipeline induced voltages, the module was giving a very large number which does not coincide which was I was expecting.

Now, this is the interesting thing, which I cannot explain: When I calculate the absolute value of the sum of the electric field per each phase for just one component, just say component 1, I am able to obtain the separated real plus imaginary numbers and the absolute value of the separated components per phase equal following the two methods: as I was doing before and now having the vector approach, like to taught me.

But when I calculate the absolute value of the three phases altogether, the numbers are way different.

See attached files: The files named vectorization include the method that you showed me, the file named single component, calculation of just one component at the time.

Etotal in the first case is 331.377, page 12 of file and Etotal in the second case is 8.5818, page 8, which is the value that I was expecting.

Rogelio

6-Contributor
(To:rdelascasas)

To all, following up with my last message,

I put the complex numbers values in a different calculation sheets and calculated the absolute value manually and found out that even when the absolute value per each component is the same, the absolute value of the three components altogether are actually different and the original real and imaginary parts are different as well. Which brought me to the conclusion that I probably need a different procedure to calculate the components Ea, Eb and Ec if I want to calculate all of them like vectors.

but I have no idea how to proceed with it.

Regards,

Rogelio

6-Contributor
(To:rdelascasas)

To all,

I found the problem,

the current per phase has to be adjusted properly.

Now, the solution that Werner proposed corresponds correctly to the answer for individual calculation.

Werner,

thank you very much again for your help!!

The issues have been solved completely, You do not have to respond to my last query to you from yesterday,

Kind Regards,

Rogelio

24-Ruby V
(To:rdelascasas)

Had seen you followup question just now and I guess I would not had found the solution anyway - so its fine you did yourself 😉

6-Contributor
(To:Werner_E)

thanks,

I was not a computational problem. it was me forgetting to change the current phases per each case.

Regards,

Rogelio

Announcements