WD0HHU

40 Reputation

3 Badges

3 years, 357 days

MaplePrimes Activity


These are replies submitted by WD0HHU

@nm  I am trying to use the Maple Calendar functions in procedures and I want to make sure the user does not input a wrong day number or month number in calls.  

P.S.  Did you know the JulianDate function is actually off by a 0.5 days? Maple folks are mathematicians and not astronomers.  But if you know this fact, it isn't a problem.

@Christopher2222 

I want to use the Calendar functions and I want to restrict the day of the month for integers from 1 to 31 and I tried the following:

TypeTools[AddType]( my_type_Month, n->evalb(n::integer and (n=`$`(1 .. 31)));

my_proc := proc(a::integer, b::my_type_Month) print(b); end proc:

The result for my_proc(3,15) 

my_proc(3, 15);
Error, type `my_type_Month` does not exist

How might I set up the condition to be a range?

Any thoughts what this error means & how to fix it?

This seems like a good tool to use.

Acer, could you tell me where exactly the "TEST.m" file is saved? What directory and path?

Most turkeys you purchase in the US grocery stores are frozen.  Typically you will "thaw" them out in the regular part of your refrigerator for a day or two until ready.  An average temperature for a refrigerator is generally kept at around 40 degrees F.  So the assumption that the turkey is at room temperature is not quite matching with the norm.  Perhaps there are some thermodynamicists out there who can come up with a more realistic math model for the proper way to cook a turkey!

Hello acer and thank you for your answers on the solution and plotting of this ODE.  

I had one question about the use of the "plotlist" in the plot3d command.  I did a search in the Maple help and I could find that option listed or explained.  Could you elaborate on whtat that command does?

Thank you again for your help.  I have worked with events before with Rosenbrock and RKF45 because one of the important things I need to know is when the spacecraft gets with the Sphere of Influence (SOI) of a planet's gravitional field.  When the spacecraft leaves Earth orbit, its orbit is highly influenced by the Earth's gravitional field.  But as it moves on its way to Mars, the spacecraft leaves the Earth's SOI AT 925,000 km.  I have so far been keeping that influence out of the picture and just focusing on the Sun's influence and Mars.  It considerably simplifies the problem but not by much.  You still need to know where Mar's is located and its state vector for every integration step.  But I set up an "event" to happen when the distance from Mars is less than 577,000 km.  Then I stop with the event, capture the state vector of the spacecraft, and do a simple coordinate transformation, and then I start the simulation this time with the only influence on the spacecraft is Mar's gravitional field.  I am pretty sure this is how the folks at Jet Propulsion Laboratory (JPL) do their mission planning for Mars missions.  

I will look at using "events" and see if that is a better way to simulate firing thrusters at a specific time.  As I say, finding the location of Mars and its position and velocity vectors in a heliocentric orbit takes a lot of computation effort.  I go to this website and "pull" the position and velocity vectors of Mars for the time frame I am interested.  The normal trajectory is about 500 days in duration.  I curve fit those state vectors using "ArrayInterpolation" with the "method" = linear.  Check out this JPL Horizions website if you would like to know more details.  Horizons System (nasa.gov)

This is a very facinating problem doing mission design and analysis.  Since some day Space X will probably go to Mars.  It will be a tough mission: 259 days to fly to Mars using a Hohmman transfer, then you have to spend about time on Mars to wait until the Earth comes around again to be in a position (454 days) to fly back, and 259 days to come home. 

Thank you again.  I'll start examing the "events" option. 

Dave

Thank you very much for your help on this problem.  When I took out the last condition that wasn't needed as you recommended, I got it to work!! The thrusters fired both times and I was sure it happened by plotting the fuel consumption and also seeing the behavior of the spacecraft's trajectory around Mars.  But I have to wonder whether some of the popular variable step solvers were "missing" the event (conditions) in the piecewise function.  I am now thinking that they can.  Perhaps I can come up with a simple case to present for a Bug report.  I wonder if I should think about using the "classical" methods that will only do a fixed step integration.  And I can make sure the events and conditions happen at a time that is an even number for the integration step size.  That would be a good experiment.  I will work on that.  When you fly a trajectory to Mars, you are talking a 500 day mission! That is over 43e6 seconds of integration.  You also have to keep track of where Mars is located and its distance from the Sun.  These trajectory studies can take a day to complete! And that is if you use a variable step solver!!!

Thank you for your help.  

Dave

Dear Mr. @Christian Wolinski, I was wondering how you derived that simplification to the OP's initial equation.  I am just curious where it came from.

 

Thank you.

This is some pretty amazing plotting you have done along with some interesting interpolation.  I find it awe inspiring!

Thank you for sharing this.

Thank you.  This time I hope my worksheet will get loaded and you can see what I am talking about and help me.  I would prefer not to use the zoom function but I don't want to destroy my eyesight with the Explore's and Document Tools 8 sized font.  I have already had my eye prescription changed this year to account for all the 8-12 sized fonts that I have been forced to read over the past 40 years!

@Scot Gould Please see my uploaded version of this fine example of using the Explore command.  Isn't there something in the Document Tools to increase the font on the slider bars?

Hello! Thank you for your great example of using the Explore command.  I had one question: How do you change the font of the parameters because they seem to be really, really small both in the slider bar and the values on the right hand side? Likewise the font on the name/symbols of the parameters you are varying with the Explore command. 

@acer Thank you for the best explanation I have ever seen about the issue of using "unevaluated" quotes.  The Maple folks who write the Help pages should take a good look at your reponse here and "re-tool" the help pages on this topic for a better explanation.  I have never really understood the Maple help page on two point BVPs example because of the quotes issue.  Acer, you not only deserve a "thumbs-up" but a GOLD STAR!!

P.S. Are you a college math professor somehere?

@AHSAN I admire your patience to write such a gigantic equation! What are you computing with this monster equation?

1 2 3 Page 2 of 3