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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Translate the entire conversation x

Ploting from solved non linear equations

Lenin
10-Marble

Ploting from solved non linear equations

Dear ptc community,

 

I am trying to plot a solved parameter of nonlinear equations (J) vs x (a variable that can range from 0 to 0.5. I have tried to plot it, but I got only a point rather than a continuous line plot. Can you please help me with it? I have attached my Mathcad  (7.0.0.0) file for your reference.
Thanks in advance.

Kind regards,
Tadele

ACCEPTED SOLUTION

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

x hast a constant value of 0.001 and J has the constant value 0.00001695 calculated by the solve block.

So when you plot J over G you are asking Prime to plot the single point (0.0001 / 0.00001695) and that is what you get.

 

If you want to vary the value of x you have to setup the solve block as a function of x and then define a function for J.

Werner_E_0-1764940512547.png

The calculation may take some time as for each x-value (with the range for xx i used that's 101 values) the solve block has to be evaluated.

You may consider setting CTOL to a more sensible larger value - IMHO 10^-10 may be too small.

 

View solution in original post

7 REPLIES 7
Werner_E
25-Diamond I
(To:Lenin)

x hast a constant value of 0.001 and J has the constant value 0.00001695 calculated by the solve block.

So when you plot J over G you are asking Prime to plot the single point (0.0001 / 0.00001695) and that is what you get.

 

If you want to vary the value of x you have to setup the solve block as a function of x and then define a function for J.

Werner_E_0-1764940512547.png

The calculation may take some time as for each x-value (with the range for xx i used that's 101 values) the solve block has to be evaluated.

You may consider setting CTOL to a more sensible larger value - IMHO 10^-10 may be too small.

 

Lenin
10-Marble
(To:Werner_E)

Thank you very much, Werner.
It works perfectly for the plot. I can now also plot epsilon as a function of x, using the way you showed me.

Just one related question I was trying to replace this equation in the constraint part of the solver (first equation for J)

Lenin_1-1764943119119.png

 

with the equation below which I can't rewrite in a form of J(x)=...as J(x) is found in both the numerator as a form of J(X)^2 and in the integral J(x)dx form 0 to x. Is there a way to do this which you can help me. I even can't start it. I will help if you/or any other kind person have any idea.

Lenin_0-1764943086539.png

Kind regards,

Lenin

Werner_E
25-Diamond I
(To:Lenin)

Thats a complete change as now (in the solve block) J is not a  constant variable but a function.

I don't think that Prime can solve integral equations.

Lenin
10-Marble
(To:Werner_E)

Ah, okay. Thank you very much, Werner. Knowing this also saves time.

Werner_E
25-Diamond I
(To:Lenin)

Maybe you could try to rewrite the equation as an ODE and use a solve block with "odesolve"?

Q.max(phi.0) is a constant value anyway because phi.0 is a constant, but why tau(x)?? So far tau was dependin on E, not on x??

Lenin
10-Marble
(To:Werner_E)

Yes, that is true. tau is dependent on E, and E is depend on epsilon which is dependent and connected with J(x), (I think, it is not yet clear yet how those variables should be used in the Mathcad. I will try to figure it out.)
Thank you.

Werner_E
25-Diamond I
(To:Lenin)

So you have function J(x), E(x) and epsilon(x) and so you could write tau(E(x)), making tau dependable on x.

Announcements

Top Tags