Skip to main content
1-Visitor
March 28, 2025
Solved

Struggling with what seems like it should be a simple solve block

  • March 28, 2025
  • 2 replies
  • 1034 views

Hello,

 

I'm working in Mathcad Prime 10

 

I am struggling to get a solve block working. I'm attempting to calculate a grid convergence index based on a published guidance document, and it requires an iterative approach which I thought could be executed by a solve block. I'm receiving various errors (see one in the image below) depending on what I try. I have attached my current workbook. Thanks for any help you can provide.

 

AL_13142368_0-1743182070225.png

 

Best answer by rgunwaldsen

1. q() is a functon and should be defined outside solve block.

2. ln() is a function and requres (postive) arguement.

3. "Parameterize" solve block with guess value to get p.

4. Use function q(p) to get q.

 

Prime 10 file attached.

2 replies

23-Emerald IV
March 28, 2025

Change the all occurrences of

q(p)

to

q

and see how that helps

 

Success!
Luc

1-Visitor
March 28, 2025

Thanks for the suggestion. I've made that change and there's still an error, but the error message is different. It used to say "Initial guess must consist of numbers and matrices" and it now says "This value must be a scalar or a matrix."

 

AL_13142368_0-1743185317138.png

 

15-Moonstone
March 28, 2025

1. q() is a functon and should be defined outside solve block.

2. ln() is a function and requres (postive) arguement.

3. "Parameterize" solve block with guess value to get p.

4. Use function q(p) to get q.

 

Prime 10 file attached.

23-Emerald IV
March 28, 2025

You could also use the symbolic solver:

LucMeekes_3-1743187721576.png

Check:

LucMeekes_2-1743187608289.png

Success!

Luc