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

Use of Pdesolve with Time-Varying Boundary Condition

rjwolfgang
4-Participant

Use of Pdesolve with Time-Varying Boundary Condition

Dear PTC Community,

 

I was recently working with a Mathcad Prime 9.0 worksheet that uses the Pdesolve function, but what I can't seem to do is define a first-derivative boundary condition (Neumann condition) in which temperature at the boundary is one of the arguments.  I get the error message "Bad algebraic constrain."  I've attached a zip file containing the worksheet.  If you can, please help me troubleshoot this issue, or else let me know that what I'm trying to do is not possible.

 

Thanks for your time!

--Bob

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:rjwolfgang)

Hi Bob,

This is what I get in (good old) Mathcad 11:

LucMeekes_0-1712700627515.png

LucMeekes_1-1712700667442.png

LucMeekes_2-1712700686343.png

LucMeekes_3-1712700738081.png

I don't think this does anything different from what you are trying.

Possible pdesolve in Prime is not yet up to standards.

I've attached my sheet. Try to create an html file from it, using the sheet translator.

If it produces a similar result, then Prime should be able to it too. In that case translate my sheet to Prime  and run that.

 

Success!
Luc

 

 

View solution in original post

10 REPLIES 10
-MFra-
21-Topaz II
(To:rjwolfgang)

It seems to me, observing the figure, that the system under consideration has cylindrical symmetry, so the Fourier equation should be used in this symmetry.

LucMeekes
23-Emerald III
(To:rjwolfgang)

Hi Bob,

This is what I get in (good old) Mathcad 11:

LucMeekes_0-1712700627515.png

LucMeekes_1-1712700667442.png

LucMeekes_2-1712700686343.png

LucMeekes_3-1712700738081.png

I don't think this does anything different from what you are trying.

Possible pdesolve in Prime is not yet up to standards.

I've attached my sheet. Try to create an html file from it, using the sheet translator.

If it produces a similar result, then Prime should be able to it too. In that case translate my sheet to Prime  and run that.

 

Success!
Luc

 

 

rjwolfgang
4-Participant
(To:LucMeekes)

Yeah, unfortunately it looks like Mathcad 11 is more flexible with the boundary conditions.  Mathcad Prime 9.0 throws an error when you have a boundary condition that is the first derivative with respect to the independent variable also dependent on the function itself, i.e., dT(L,t)/dx has T(L,t) as one of its terms.  I have a Mathcad 11 license, but I can't install it ever since PTC changed its licensing policy.  If I have a Mathcad Prime license, is it possible that PTC would somehow allow me to install an earlier version of Mathcad as well?  Maybe I should start a new thread under the 'licensing' topic.

 

Thanks for your help!

--Bob

Werner_E
25-Diamond I
(To:rjwolfgang)

Lucs sheet works equally well in Mathcad 15 (creation of vector X has to be done a bit differently, but thats no big problem).

After converting the sheet to Prime format, Prime throws the "Bad algebraic constrain." error you already have seen.

After disabling the constraint crossed out in the picture below it looks we get the same solutions as shown in Luc's sheet !?? Not sure, though.

Werner_E_1-1712785512198.png

Werner_E_2-1712785592373.png

 

 

 

rjwolfgang
4-Participant
(To:Werner_E)

Wow, that's fascinating!  How did you "disable the second constraint".  It shows up in Prime as being "grayed out", but it's not obvious to me as to how things are disabled or enabled.  Is there a menu item for that somewhere?

 

Thanks!

--Bob 

Werner_E
25-Diamond I
(To:rjwolfgang)

You can either disable a region via the menu (Calculation ribbon)

Werner_E_0-1712789147571.png

 

or you can use the right mouse click menu.

Unfortunately this menu does not show up when you simply click in the region. You rather must "fence" the region so that it gets blue for the right click menu to work.

Werner_E_1-1712789189897.png

 

Of course you also could simply delete the region if its not necessary 😉
But I guessed that this  constraint would be there for a specific reason ...

rjwolfgang
4-Participant
(To:Werner_E)

Thanks for the tip, Werner!  I appreciate your time and patience!

 

--Bob

LucMeekes
23-Emerald III
(To:Werner_E)

It appears that Mathcad 11 is equally happy, without that third constraint:

LucMeekes_1-1712941829548.png

I guess you have to understand the (physical) situation to explain why that is...

 

Success!
Luc

 

Werner_E
25-Diamond I
(To:LucMeekes)

I just tried your converted sheet in Prime 10 and activating that third constrained did NOT result in an error:

Werner_E_0-1712946639876.png

So PTC seems to have fixed it.

See: https://www.mathcad.com/en/blogs/whats-new-in-ptc-mathcad-prime-10

 

Improved calculus operators: 
This includes improvements in pdesolve and general engine improvements.
Building off the previous release of pdesolve, users can now set mixed boundary conditions, along with implicit and explicit boundary conditions. 

 

rjwolfgang
4-Participant
(To:Werner_E)

Hallelujah!  This is the moment we've all been waiting for!

 

And there was much rejoicing!

 

Thanks everyone for all your help! 🙂

--Bob

Announcements

Top Tags