venu1591

20 Reputation

3 Badges

4 years, 214 days

MaplePrimes Activity


These are questions asked by venu1591

Hello Everyone,
I have written a procedure which takes one input and gives one output. Now, if I want to find the root of that procedure (as in when my procedure gives a '0' output), Is there any method to do it directly?
One idea that I got is to use maple's inbuilt Secant method (with(Student[NumericalAnalysis]). But this method can be done only for functions. Hence, my question.
How can we convert a maple procedure which takes one input and gives one output into a maple function? Also, is there a method to apply secant method on such function?
Please consider the following example:

As can be seen, it seems not possible to apply secant method on procedures.
Can someone please help me in doing this or any alternate method to get the job done?


 

Hello,
I want to update Alphabets in my ‘for loop’ instead of numbers. Please look at the code below:


for Tl from 263 by 5 to 313 do
   for Ql from 25 by 25 to 300 do
        myvel:= my_porous(Ql, Tl, ratiol);
        Export(<myvel>, "HPporousmodel.xlsx", 1, my_alph[vcount]);
        vcount := vcount+1;

   end do

end do
 

Here, my_alph is a manually created alphabets corresponding to excel columns as below:

my_alph:=[ "A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1", "I1", "J1", "K1", "L1", "M1", "N1", "O1", "P1", "Q1", "R1", "S1", "T1", "U1", "V1", "W1", "X1", "Y1", "Z1", "AA1", "AB1", "AC1", "AD1", "AE1", "AF1", "AG1", "AH1", "AI1", "AJ1", "AK1", "AL1", "AM1", "AN1", "AO1", "AP1", "AQ1", "AR1", "AS1", "AT1", "AU1", "AV1", "AW1", "AX1", "AY1", "AZ1", "BA1", "BB1", "BC1", "BD1", "BE1", "BF1", "BG1", "BH1", "BI1", "BJ1", "BK1", "BL1", "BM1", "BN1", "BO1", "BP1", "BQ1", "BR1", "BS1", "BT1", "BU1", "BV1", "BW1", "BX1", "BY1", "BZ1"]:

The idea is to export the velocity vector that I get from proc (my_porous(Ql, Tl, ratiol)) in to an excel sheet (HPporousmodel.xlsx)with the command (Export(<myvel>, "HPporousmodel.xlsx", 1, my_alph[vcount]);). I want to export the velocities into a new column for every iteration starting from A, B, C,….. and so on. However, since I don’t know how to do that I’ve used a manually created list my_alph. This has a big disadvantage of restricting the number of times I can loop. For this case, I can only loop (3*26=78 times). Anything more asks for manually increasing the entries of my my_alph list. I want to loop for 100's of times which is becoming a big problem with this method.

Can anyone please help me in automating this without any such constraints as we do with numbers (like we have done for vcount here)?
 

Thank you.
 

Dear community,

I am new to maple and was trying to get a solution for simple Hagen Poiseuille Flow. Hagen Poiseuille Flow  has governing equation as :

ode2 := -v+mu((diff(r*(diff(ur), r)), r))/r) = 0

here 'v' is a constant (pressure gradient) and the equation is in cylindrical coordinates

the problem has two boundary conditions as u(R) = 0 and u(0) = 'finite'.

I am struck at the second condition as there seems to be no option to say maple that the solution should be finite at a point.

Can anyone help me in this regard?

 

 

Alternatively, I can give second boundary condition as (D(u))(0) = 0. However, this gives a solution as follows:

dsolve({ode2, u(R) = 0, (D(u))(0) = 0}, u(r)):

u(r) = (1/4)*RootOf(-mu(_Z)+v)*r^2-(1/4)*RootOf(-mu(_Z)+v)*R^2

 

This doesn't look very easy, and I don't know what to do with this. 

The solution for the above differential equation is simple and can be obtained on paper. Please help.

 

Thank you.

 

 

Page 1 of 1