ERROR : Result is not Skalar Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » ERROR : Result is not Skalar « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Andreas Ferber (madprofessor)
New member
Username: madprofessor

Post Number: 1
Registered: 04-2009
Posted on Thursday, April 02, 2009 - 01:19 pm:   

Hello
Iīm new here. I have some qestions about Flexpde I was not able to solve on my own.
First question: If i want to multiply a term with the imaginary unit i * term . Is it right to write the following in the Flexpde editor:
Complex(0,1)*term
I read the Userīs Guide topic "Complex Variables" so I think that must be right. But I think there is a mistake in the Userīs Guide on the first Page to Complex Variables. When I split the equation in two, one for Cr and one for Ci, I get a +Ci instead of a -Ci in the first line and a
-Cr instead of +Ci in th second line. Anyway my problem is that if I run my script I get the message !ERROR : Result is not Skalar!
I put my skript down below. I would thank you to correct me if I made any rookie mistakes. As I said I looked thru the whole Userīs guide and asked also Google but didnīt get any answers out of it. So thanks a lot for your efforts.



TITLE 'Karttesisch 1D dynamisches Kompressionsverhalten' { the problem identification }
COORDINATES cartesian1 { coordinate system, 1D,2D,3D, etc }
VARIABLES { system variables }
Theta = COMPLEX(Theta_r,Theta_i) { choose your own names }
Phi = COMPLEX(Phi_r,Phi_i)
! SELECT { method controls }
DEFINITIONS { parameter definitions }
h_plus=0.001
gamma=1.4
Pe=10000000
kappa=10000000
Pr=0.71
! INITIAL VALUES
EQUATIONS { PDE's, one for each variable }
Theta: Theta + h_plus*( gamma-1 )*dx(Phi) + COMPLEX(0,1)*(gamma/Pe)*dxx(Theta)=0 { one possibility }
Phi: (gamma)*(Pe^2)*Phi - (kappa^2/h_plus)*dx(Theta) + (kappa^2 + (4/3)*Complex(0,1)*gamma*(Pr)*(Pe))*dxx(Phi)=0
! CONSTRAINTS { Integral constraints }
BOUNDARIES { The domain definition }
REGION 1 { For each material region }
START(0) Point Value(Phi_r)=0 Point Value(Theta_r)=0 Point Value(Phi_i)=0 Point Value(Theta_i)=0 { Walk the domain boundary }
LINE TO (1) Point Value(Phi_r)=1 Point Value(Theta_r)=0 Point Value(Phi_i)=1 Point Value(Theta_i)=0
! TIME 0 TO 1 { if time dependent }
MONITORS { show progress }
PLOTS { save result displays }
Elevation(Phi_r )From(0) to(1)
END
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1237
Registered: 06-2003
Posted on Thursday, April 02, 2009 - 07:03 pm:   

There is a logic error in the symbolic processor treatment of complex expressions.

The expression simplifier transforms Complex(a,b)+real into Complex(a+real,b), but ignores the related expression real+complex(a,b). A similar error occurs with subtractions. This causes misleading error diagnostics like the one reported in this post.

This error has been corrected, and a repaired Win32 version has been posted at www.pdesolutions.com/buglist6.html

This correction will be included in the next version release.

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration