Reputation
Next privilege 250 Rep.
View close votes
Badges
7
Newest
 Commentator
Impact
~2k people reached

  • 0 posts edited
  • 0 helpful flags
  • 22 votes cast
Apr
7
comment Improving the speed of evaluating numerical solution to a sytem of PDE
After spending more time on the code I find that the simplification introduced in "full solution" has some difficulties with the boundary conditions at x=1. The variable "p" represents the partial pressure of a component, and there are some implied conservation laws as you pointed out. For example : psco2[x]=psco2[1]+psmeoh[1]+psco[1]-psmeoh[x]-psco[x]. With this replacement rule however, the code fails because the variables are no longer decoupled.
Mar
30
comment Improving the speed of evaluating numerical solution to a sytem of PDE
Wow, that is very sensitive. Following your steps I've been able to get it to ru, this should be a very strong first step in getting this to work for the full problem. I will now have to introduce temperature dependence as well as axial location in the bed (w). In this kind of numerical simulation with a singularity at x=0, is there a way to avoid setting a δ cutoff?
Mar
29
comment Improving the speed of evaluating numerical solution to a sytem of PDE
Thanks for taking an interest in this problem. I've been trying to reproduce your results but so far I am unsuccessful. When I naively copy the first code (first attempt) into a blank notebook, I encounter an error message: At x == 0.08293242960370201`, step size is effectively zero; \ singularity or stiff system suspected
Mar
29
accepted Improving the speed of evaluating numerical solution to a sytem of PDE
Mar
25
comment Improving the speed of evaluating numerical solution to a sytem of PDE
@bbgodfrey Could you show me what code you are using, to get me started?
Mar
25
comment Improving the speed of evaluating numerical solution to a sytem of PDE
@user21 This does not seem to help I'am afraid.
Mar
25
comment Improving the speed of evaluating numerical solution to a sytem of PDE
@bbgodfrey Could you explain what difference it makes to use Set instead of SetDelayed ?
Mar
25
comment Improving the speed of evaluating numerical solution to a sytem of PDE
@george2079 I am using ParametricNDSolve because my dummy functions normally depend on w, although I have surpressed the dependence in this example in order to simplify the computation. I'm afraid I don't understand your suggestion about initial value problem, could you elaborate?
Mar
24
asked Improving the speed of evaluating numerical solution to a sytem of PDE
Feb
28
comment Applying a function to the second element of a list
I see, now it works.
Feb
28
asked Applying a function to the second element of a list
Feb
27
accepted Importing crude oil prices from WolframAlpha
Feb
27
comment Importing crude oil prices from WolframAlpha
Indeed, I have done that. But what I would like to do is to import this into mathematical for further treatment. At the moment I don't know how to do it.
Feb
27
asked Importing crude oil prices from WolframAlpha
Jan
18
comment Problem solving a second-order PDE
I would say it's pretty bad. In general, r represents the reaction rate and is a complicated function of concentrations and temperatures involving multiple exponentials. A typical expression will look like that :image.slidesharecdn.com/…
Jan
17
comment Problem solving a second-order PDE
So in this case your strategy is to look for an exact solution with w as a parameter, then replace w with its value ? Do you think it will work with more complicated functions for r, with definite dependence on w ?
Jan
17
awarded  Commentator
Jan
17
revised Problem solving a second-order PDE
edited body
Jan
17
comment Problem solving a second-order PDE
@KellenMyers I have been wondering about that, but I have tested similar conditions on simpler differential equations and had no issues.
Jan
17
comment Problem solving a second-order PDE
@MichaelE2 re: bc1 etc, you are correct, sorry that was another typo which I fixed. When I say I removed w, I meant I removed it from NDSolve, as in the edit.