[pstricks] Re : Problems with "saveData" in "\psplotDiffEqn"

Manuel Luque mluque5130 at aol.com
Mon May 30 08:32:56 CEST 2011


 Herbert wrote :
>it is a problem with the ztansformation matrix which isn't
>restored well. I have no real clue how to solve this problem.


Indeed it is not easy! However, the arrays of dots are calculated. The position of a particle on a line of flow maybe perfectly placed (page 2).

Thank you

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pstricks-add,pst-func}

\def\vXvY{(v0*((y[1])^4)-wR*(Ra^2)*((y[1])^3)+2*v0*(y[0]^2)*((y[1])^2)+((y[1])^2)*v0*((Ra)^2)-wR*(Ra^2)*(y[0]^2)*(y[1])+v0*(y[0]^4)-v0*(Ra^2)*(y[0]^2))/((y[0]^2+y[1]^2)^2)
|
(y[0]*(Ra^2)*(wR*((y[1])^2)-2*v0*(y[1])+wR*(y[0]^2)))/((y[0]^2+y[1]^2)^2)}

\begin{document}
Cette partie permet de créer les tableaux(\textsf{PSTdatai}), des positions des particules sur chaque ligne de courant à différents instants $t=k\mathrm{d}t$. Cette partie comporte plusieurs bugs mais génère bien les tableaux.
\begin{center}
\begin{pspicture}(-8,-6)(8,6)%
\psgrid%
\psframe*[linecolor=gray!30](-8,-6)(8,6)%
\pstVerb{%
/v0 1 def % vitesse a l'infini m/s
/Ra 1 def % rayon du cylindre
/wR 2.25 def % vitesse de rotation du cylindre rd/s
}%
\pscircle{!Ra}
\BeginSaveFinalState%
\multido{\ry=-5+0.5,\i=0+1}{25}{%
\psplotDiffEqn[%
    linecolor=red,%
    method=rk4,%
    algebraic,%
    plotpoints=1000,%
    saveData=true,%
    filename=PSTdata\i,%
    whichabs=0, whichord=1]{-8}{35}{-8 \ry}{\vXvY}%
}%
\EndSaveFinalState%
\pscircle[fillstyle=solid,fillcolor=gray,linecolor=red]{!Ra}
\psarc{->}(0,0){0.75}{240}{300}
\psgrid%
\end{pspicture}
\end{center}
\newpage
On place les particules sur chaque ligne d'écoulement à un instant choisi.
\begin{center}
\begin{pspicture*}(-8,-6)(8,6)%\psgrid
\psframe*[linecolor=gray!30](-8,-6)(8,6)%
\pstVerb{%
/v0 1 def % vitesse a l'infini m/s
/Ra 1 def % rayon du cylindre
/wR 2.25 def % vitesse de rotation du cylindre rd/s
}%
\multido{\ry=-5+0.5,\i=0+1}{25}{%
\psplotDiffEqn[%
    linecolor=red,%
    method=rk4,%
    algebraic,%
    plotpoints=1000,%
    whichabs=0, whichord=1]{-8}{35}{-8 \ry}{\vXvY}%
}%
\pscircle[fillstyle=solid,fillcolor=gray,linecolor=red]{!Ra}
\psarc{->}(0,0){0.75}{240}{300}
\multido{\i=0+1}{25}{%
\pstVerb{[/I [(PSTdata\i) run] def}%
\psdot[linecolor=red,linewidth=2pt](!/X1 I 300 get def /Y1 I 301 get def X1 Y1)
}
\end{pspicture*}
\end{center}
\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Manuel

 


 

 

-----E-mail d'origine-----
De : Herbert Voss <Herbert.Voss at FU-Berlin.DE>
A : Graphics with PSTricks <pstricks at tug.org>
Envoyé le : Lundi, 30 Mai 2011 8:07
Sujet : Re: [pstricks] Problems with "saveData" in "\psplotDiffEqn"


Am 28.05.2011 20:02, schrieb Manuel Luque:

> When we use the option "saveData=true" of the macro "\psplotDiffEqn" (package 
"pstricks-add") in a loop, it arises two strange behaviors:
> -  a systematic horizontal shift of the  curves.
> -  a downscaling  of the grid ("psgrid") and objects.
>
> Did you know these problems? Do you have a solution?

it is a problem with the ztansformation matrix which isn't
restored well. I have no real clue how to solve this problem.

Herbert
_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110530/8d4905c9/attachment.html>


More information about the PSTricks mailing list