6 years, 17 days

## How to generate a dat file for contour p...

Maple

Dear Fellows
Hoped everything is fine with you. I plotted some contours for a flow model and i want to generate its dat file. Please help me in this regard. Thanks

Maple

Dear Friends,

## Error in Sequence command...

Maple

Dear fellows
I have the problme with first seq command.
for i while i <= M1-2 do for j while j <= M1-2 do for k while k <= M1 do Eq[i, jk] := simplify(eval(R, [x = i/(M1-2.), y = j/(M1-2.), t = k/(M1-1.)])) = 0 end do end do end do:

Sol := fsolve({seq(BC1[m8, m9]\$m8 = 1 .. M1, m9 = 1 .. M1), seq(BC2[m10, m11]\$m10 = 1 .. M1, m11 = 1 .. M1), seq(BC3[m12, m13]\$m12 = 1 .. M1, m13 = 1 .. M1), seq(BC4[m14, m15]\$m14 = 1 .. M1, m15 = 1 .. M1), seq(IC1[m4, m5]\$m4 = 0 .. M1, m5 = 1 .. M1), seq(IC2[m6, m7]\$m6 = 0 .. M1, m7 = 1 .. M1), seq(Eq[m1, m2, m3]\$m1 = 1 .. M1-2, m2 = 1 .. M1-2, m3 = 1 .. M1-1)});

Got the following error.

Error, invalid input: seq expects its 3rd argument, step, to be of type numeric, but received m3 = 1 .. 1

## How to solve system of PDEs in maple?...

Maple

I want to solve the following system using PDE Solve command but finding an error. Please help me in this regard. Thanks!

restart; d1 := 1; d2 := 1; AA := 0.2e-2; BB := 0.79e-1; L := 1;
with(PDEtools, casesplit, declare);
PDE1 := diff(u(x, t), t) = d1*(diff(u(x, t), x, x))-u(x, t)*v(x, t)^2+AA*(1-u(x, t)); PDE2 := diff(v(x, t), t) = d1*(diff(v(x, t), x, x))+u(x, t)*v(x, t)^2-BB*v(x, t);
/  2         \
d            | d          |                  2
PDE1 := --- u(x, t) = |---- u(x, t)| - u(x, t) v(x, t)  + 0.002
dt           |   2        |
\ dx         /

- 0.002 u(x, t)
/  2         \
d            | d          |                  2
PDE2 := --- v(x, t) = |---- v(x, t)| + u(x, t) v(x, t)
dt           |   2        |
\ dx         /

- 0.079 v(x, t)
IBC1 := {u(0, t) = 1, u(1, t) = 1, u(x, 0) = 1-(1/2)*sin(Pi*(x-L)/(2*L))^100}; IBC2 := {v(0, t) = 0, v(1, t) = 0, v(x, 0) = (1/4)*sin(Pi*(x-L)/(2*L))^100}; dys1 := {IBC1, IBC2, PDE1, PDE2};
/              /  2         \
| d            | d          |                  2
dys1 := < --- u(x, t) = |---- u(x, t)| - u(x, t) v(x, t)  + 0.002
| dt           |   2        |
\              \ dx         /

- 0.002 u(x, t),

/  2         \
d            | d          |                  2
--- v(x, t) = |---- v(x, t)| + u(x, t) v(x, t)  - 0.079 v(x, t),
dt           |   2        |
\ dx         /

/                                                           100
|                                        1    /1           \
< u(0, t) = 1, u(1, t) = 1, u(x, 0) = 1 - - sin|- Pi (x - 1)|
|                                        2    \2           /
\

\
|
>,
|
/

/                                                       100\
|                                    1    /1           \   |
< v(0, t) = 0, v(1, t) = 0, v(x, 0) = - sin|- Pi (x - 1)|    >
|                                    4    \2           /   |
\                                                          /

\
|
>
|
/
pds := pdsolve(dys1, numeric, time = t, range = 0 .. 1);
Error, (in pdsolve) invalid input: `pdsolve/numeric` expects its 2nd argument, IBCs, to be of type {list, set}, but received time = t
p1 := pds:-plot(t = 0, numpoints = 50);

p2 := pds:-plot(t = 1/8, numpoints = 50, color = blue);

p3 := pds:-plot(t = 1/4, numpoints = 50, color = green);

plots[display]({p1, p2, p3});
Error, `pds` does not evaluate to a module
Error, `pds` does not evaluate to a module
Error, `pds` does not evaluate to a module
Error, (in plots:-display) expecting plot structures but received: {p1, p2, p3}

## How to convert the tekplot file...

Maple

plot([v[Iterations-4], v[Iterations-3], v[Iterations-2], v[Iterations-1], v[Iterations-1]], t = 1 .. 2.9, color = [red, green, blue, black, purple]); g11 := plot([v[Iterations-4], v[Iterations-3], v[Iterations-2], v[Iterations-1], v[Iterations-1]], t = 1 .. 2.9, color = [red, green, blue, black, purple], numpoints = 200);

with(plots); p11 := display({g11}, axes = boxed, thickness = 2); dat1 := `~`[plottools:-getdata]([p11]); for i while i <= 5 do A[i] := dat1[i, 3]; Y[i] := A[i][1 .. -1, 2] end do; X := A[1][1 .. -1, 1]; MM1 := `<|>`(X, Y[j2]\$j2 = 1 .. 5);

[[
[[
dat1 := [["curve", [1. .. 2.9, 1.25843241253069330813854745573 ..
[[

[ 200 x 2 Matrix       ]]
[ Data Type: sfloat    ]]
3.64143345197220537035927195897], [ Storage: rectangular ]],
[ Order: Fortran_order ]]

[
[
["curve", [1. .. 2.9, 1.26033290400709038909782882918 .. 6.355\
[

[ 200 x 2 Matrix       ]]  [
[ Data Type: sfloat    ]]  [
77353302842195250192992449], [ Storage: rectangular ]], [
[ Order: Fortran_order ]]  [

"curve", [1. .. 2.9, 1.26039280181499972068892216922 .. 9.3496\

[ 200 x 2 Matrix       ]]  [
[ Data Type: sfloat    ]]  [
4246576526181629314962273], [ Storage: rectangular ]], [
[ Order: Fortran_order ]]  [

"curve", [1. .. 2.9, 1.26039397590711135163918382958 .. 10.112\

[ 200 x 2 Matrix       ]]  [
[ Data Type: sfloat    ]]  [
7233044121210212769952674], [ Storage: rectangular ]], [
[ Order: Fortran_order ]]  [

"curve", [1. .. 2.9, 1.26039397590711135163918382958 .. 10.112\

[ 200 x 2 Matrix       ]]]
[ Data Type: sfloat    ]]]
7233044121210212769952674], [ Storage: rectangular ]]]
[ Order: Fortran_order ]]]
Error, 1st Matrix dimension size (1..1) is too small to fit source size (1..200)
Error, number of indices exceeds rank
ExportMatrix("C:/Users/DELL/Dropbox/Common Data (UH)/Hamid made model/For Hamid Thesis/P4 Picard for ODEs/Tecplot//P5 case 1.dat", MM1)
Error, invalid input: ExportMatrix expects its 2nd argument, M, to be of type {Matrix, list(Matrix)}, but received Vector[row](6, {(1) = X, (2) = Y[1], (3) = Y[2], (4) = Y[3], (5) = Y[4], (6) = Y[5]})

 1 2 Page 1 of 2
﻿