An Help with ODE system - Сообщения
WroteIt is possible to solve the system in this way, i.e. integrating each equation separately. But here you need to be very careful.
...
Hi Viacheslav. Please, explain me with more details about what do you do. I have two questions:
1. Original equations are decupled? Sorry, I don't check that, I ask it because I assume you see this problem in depth and it's easy for you answer this.
2. Is your setup general for solve an ode with a large interval of integration? This is, I know that if the domain for an ode is too large, numerical methods can be implemented "by parts", with small portions of it, but actually never use that in the practice, or remember practical examples of it.
Best regards.
Alvaro.
WroteHi Viacheslav. Please, explain me with more details about what do you do. I have two questions:
1. Original equations are decupled? Sorry, I don't check that, I ask it because I assume you see this problem in depth and it's easy for you answer this.
No. I showed the same method, only written differently. For this example both algorithms do almost the same thing.
Wrote2. Is your setup general for solve an ode with a large interval of integration? This is, I know that if the domain for an ode is too large, numerical methods can be implemented "by parts", with small portions of it, but actually never use that in the practice, or remember practical examples of it.
Yes, you can split a large interval into small portions. The solvers themselves do this. Usually inside the solver there is a loop in which a so-called step-function is called for each portion. This step-function can also split the portion into small parts depending on the complexity or accuracy of the method.
I didn’t point out correctly that it can be integrated separately. I meant that you can split the vector of derivatives D(t,x) into separate parts and integrate each element separately. Since the equations are dependent on each other, then this should be done as I showed.
I did this to make it easier to add elements to the vector of derivatives. Instead of one huge program block, you get many small expressions. This may not always be done, but if the derivatives are smooth over a given interval, then you can even use Euler's method.
I just took the inner for-loop of the solver out and limited the solution to two points (one step). That's all.
Just not directly implementable from the ODE library, maybe the last SS.
1. Fill-in all those '?' ... what are they ?
2. Compare solutions with the "paper PDF"
3. The compactum program adds confusion.
4. Always think in term of sanity check outside Smath, i.e: make it piece wise.
Prova modello permeabilita Initial.sm (158 КиБ) скачан 27 раз(а).
But what's more impressive to me, it's the Viacheslav intuition for the magistral setup that he do for solve the problem with a runge kutta method with ... one as the step!. Ok, he's the author of the solver plugin, maybe he know what it's talking about.
Modeling respiration-transpiration in a modified atmosphere packaging system containing blueberry 2 (uni).sm (23 КиБ) скачан 31 раз(а).
Best regards.
Alvaro.
For those who are not familiar with numerical methods, it is difficult to describe the problem for the solver. I still can't finish a new solver, where the system can be written in a natural form, like a set of equations. This would make things easier for most typical cases.
What I'm learning from all your post is really useful and interesting.
Wrote... The solvers also support optional parameters after t and x. You can enter both variables r1 and r2: D( t,x,r1,r2 ). This will make the calculation of derivative values clearer.
I did not know this feature of your plugin. Here, in case that this setup it's ok, it fails, I guess for the order in the updates too.
Modeling respiration-transpiration in a modified atmosphere packaging system containing blueberry 2 (uni).sm (51 КиБ) скачан 30 раз(а).
Best regards.
Alvaro.
WroteWhat I'm learning from all your post is really useful and interesting.
The ancestor of all these solvers is Euler [Fortran 1970], print stars instead of line.
Your two system DE's can you make them Euler style ?
ODE Euler Multitask.sm (129 КиБ) скачан 41 раз(а).
WroteWroteWhat I'm learning from all your post is really useful and interesting.
The ancestor of all these solvers is Euler [Fortran 1970], print stars instead of line.
Your two system DE's can you make them Euler style ?
ODE Euler Multitask.sm (129 КиБ) скачан 41 раз(а).
To be honest, really I don't know if is possible, I can try and we will see what happens.
The problem with these 5 ODE is that they aren't really stable and a lot of strange things happen if the order of resolution isn't correct.
For sure isn't the best-case scenario to face for someone like me, that has basically zero experience with software/numerical methods.
Now I'm sure that in R someone was able to implement and validate it...but really I would like to avoid it for the moment

I will spend this week working on all your advice and trying various approaches, in a way or another some sort of result will come!
WroteThe problem with these 5 ODE is that they aren't really stable
Why don't you stick with the two DE's from the paper ?
In fact you just want to reproduce the paper, before getting lost in adventure.
If all those things/coefficients aren't identified, may as well don't have.
Presume some smart cat has done the project otherwise than Smath,
looking at your proposal will discredit both in red cross all over.
Why not first reproduce the paper 1/1, c/w the plotted solutions ?
From there, if solutions deviate from lab test ... what is the cause.
This is in fact the interest of the adventure, isn't ?
WroteI did not know this feature of your plugin. Here, in case that this setup it's ok, it fails, I guess for the order in the updates too.
This was mentioned here.
Modeling respiration-transpiration in a modified atmosphere packaging system containing blueberry 3 (uni).sm (18 КиБ) скачан 32 раз(а).
Modeling respiration-transpiration in a modified atmosphere packaging system containing blueberry 3 (uni).pdf (79 КиБ) скачан 25 раз(а).
Modeling respiration-transpiration in a modified atmosphere packaging system containing blueberry 4 (uni).sm (18 КиБ) скачан 31 раз(а).
Modeling respiration-transpiration in a modified atmosphere packaging system containing blueberry 4 (uni).pdf (77 КиБ) скачан 35 раз(а).
This is an optional feature. Everything works without explicitly specifying variables, but this is not always clear.
Файл не найден. Файл не найден.
WroteWroteThe problem with these 5 ODE is that they aren't really stable
Why don't you stick with the two DE's from the paper ?
In fact you just want to reproduce the paper, before getting lost in adventure.
If all those things/coefficients aren't identified, may as well don't have.
Presume some smart cat has done the project otherwise than Smath,
looking at your proposal will discredit both in red cross all over.
Why not first reproduce the paper 1/1, c/w the plotted solutions ?
From there, if solutions deviate from lab test ... what is the cause.
This is in fact the interest of the adventure, isn't ?
Jean, unfortunately, the model on paper has more than these two ODE, so even for the comparing of results would be needed to implement all the other pieces. The respiration and transpiration rate are both temperature-dependent.
In any case, the implementation of the system of two made by Viacheslav work really well and the results have a physical sense, so being more precise require do add more things.
Someone suggest me to try to use lsoda for this problem...I have to try.
You know "Audentes Fortuna iuvat"

My friend next door used to transport raspberries from California => Montréal.
Temperature control was fine. The most impressive was the opening of the cargo
at destination. They had to wear mask of the Scot Pack style to avoid poisoning
from the dreadful environment in the cargo.
A DE's system of 7 is pretty big monster. It could probably be optimized via
Mathcad ODEsolve, GivenMinerr, having the 7 sets of lab data. Up to 3 was done
for different applications [Medical, Chemical ...]
@ 1000 km per driver, California => Montréal is 3 days journey 2 drivers.
Hurry to see the 7 parametric DE's system in piece wise mode.
Cheers ... Jean
WroteWroteI did not know this feature of your plugin. Here, in case that this setup it's ok, it fails, I guess for the order in the updates too.
This was mentioned here.
...
Hi uni. I forgot this feature because I always thinks that it was the same as the matlab parameter placeholder, just to avoid to declare global variables for the local ones that usually appear in the m-script for define the function D. This could be more or less useless in SMath but here I think that you have an actual example of a mandatory use for this feature, because if not the RK procedure gives a bad solution if you don't pay attention to the order of the updates inside the D procedure, as first issue. I guess that there are more.
Wrote
...
This is an optional feature. Everything works without explicitly specifying variables, but this is not always clear.
I bad implement this feature in my example, and you show how to implement it well. Just as comment, for no pass parameters as global values at all, this is a minor modification:
Wrote...
In any case, the implementation of the system of two made by Viacheslav work really well and the results have a physical sense, so being more precise require do add more things.
...
Thanks efus for this drawing describing the physical situation.
Best regards.
Alvaro
Radau DE solver was designed by Mathsoft for this difficult example.
dn_GearsBDF does 1/1 in native Smath.
ODE HIRES.sm (67 КиБ) скачан 29 раз(а).
Edit.
Ok, probably how the system is written isn't the most elegant thing to see, but the loss of weight due to respiration seems to be well represented (green line). The effect of the humidity isn't, at the moment, represented, but with a little bit of work I think it will do.
lsoda MAP.sm (43 КиБ) скачан 24 раз(а).
Цитата. that's what I meant by piece wise modular [a system of 8 DE's]
Radau DE solver was designed by Mathsoft for this difficult example.
dn_GearsBDF does 1/1 in native Smath.
Thx a lot Jean, now I give it a look, I'm quite sure that I can learn useful stuff from it!
ЦитатаThanks efus for this drawing describing the physical situation.
:d Ah google come in my help for the pictures, but yes, it describes exactly what happened in the package.
Help for humid air: http://www.coolprop.org/fluid_properties/HumidAir.html
Collprop for SMath: https://en.smath.com/forum/yaf_postst7398_CoolProp-Wrapper.aspx
Also, I see your loda implementation, it's ok, and I don't know if the fact that you redefine the parameter "y" in the body of D() have any implication, but you must to know that in SMath if you pass parameters in that way "things happens":
Best regards.
Alvaro.
WroteHi efus. Maybe you could be interested in the coolprop plugin.
Help for humid air: http://www.coolprop.org/fluid_properties/HumidAir.html
Collprop for SMath: https://en.smath.com/forum/yaf_postst7398_CoolProp-Wrapper.aspx
Also, I see your loda implementation, it's ok, and I don't know if the fact that you redefine the parameter "y" in the body of D() have any implication, but you must to know that in SMath if you pass parameters in that way "things happens":
Best regards.
Alvaro.
The plugin is for sure interesting! I have intention in the future to face some problem related to respiration with a pure thermodynamic approach, so for sure it will be handy!
Regarding "things happens"

Francesco.
What I understand, this particular project is Isoda Blueberries
It can't be sanity check via one of the most, if not the most reputed Mathcad/Mathsoft.
Not even from native original Smath ... any lab data set to sanity the plots ?
We are not in phase in this project, sorry ... Cheers ... Jean gone.
-
Новые сообщения
-
Нет новых сообщений