FastFieldSolvers Forum
FastFieldSolvers Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 FastFieldSolvers
 FastHenry2
 Possible errors in writing files

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Antispam question: What do MOONwalk and MOONdance have in common?
Answer:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON

 
   

T O P I C    R E V I E W
dnl Posted - Sep 17 2007 : 15:59:47
My Zc.Mat file contains different data to that displayed in the program window

Program window:
Frequency = 1e+007
Forming sparse matrix preconditioner..
conductor 0 from node ng1c_pseudo_11
Calling gmres...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 
conductor 1 from node ng1c_pseudo_10
Calling gmres...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 

Computed matrices (R+jL)
 Row 0:  n1c_c1 to n1e_c1
 Row 1:  n1c_c2 to n1e_c2
 Freq = 0.1
  Row 0: 0.000896206+8.2479e-009j 0.000516544+4.89758e-009j 
  Row 1: 0.000516544+4.89936e-009j 0.00136594+1.18344e-008j 
 Freq = 1000
  Row 0: 0.000898476+8.19934e-009j 0.000517682+4.87085e-009j 
  Row 1: 0.000517685+4.87259e-009j 0.00136915+1.17781e-008j 
 Freq = 1e+007
  Row 0: 0.00177828+3.72265e-009j 0.00115711+2.32861e-009j 
  Row 1: 0.00115721+2.32849e-009j 0.00268639+4.63719e-009j 

All impedance matrices dumped to file Zc.mat

Times:  Read geometry   0.25
        Multipole setup 8.485
        Scanning graph  0.046
        Form A M and Z  0.0469999
        form M'ZM       0
        Form precond    4.954
        GMRES time      15.03
   Total:               28.812



and the file, as read into the Matlab editor
Row 2:  n1c_c2  to  n1e_c2
Row 1:  n1c_c1  to  n1e_c1
Impedance matrix for frequency = 0.1 2 x 2
   0.000896206 +5.18231e-009j   0.000516544 +3.07724e-009j 
  0.000516544 +3.07836e-009j    0.00136594 +7.43577e-009j 
Impedance matrix for frequency = 1000 2 x 2
   0.000898476  +5.1518e-005j   0.000517682 +3.06044e-005j 
  0.000517685 +3.06154e-005j    0.00136915  +7.4004e-005j 
Impedance matrix for frequency = 1e+007 2 x 2
    0.00177828     +0.233901j    0.00115711     +0.146311j 
   0.00115721     +0.146303j    0.00268639     +0.291363j 



So the floating point exponent appears completely wrong!

Writing files appears a little troublesome at present:
  • Some .mat are ascii text, others are Matlab binary form
  • Some .mat binary files are not readable by Matlab
  • Use of the "-k text" option still appeared to produce binary files

Hopefully, they are all linked to the common bug causing the first fault listed above.


David Lee
Power Electronics, UK
2   L A T E S T    R E P L I E S    (Newest First)
dnl Posted - Sep 27 2007 : 09:46:15
Thanks for your response. I should have picked up that impedance is not the same as R+jL.

I had skiped over the passage on ReadOutput in the manual because it talked about the source code, "ReadOutput.c" which I assumed was there for integrating into other programs - and I do not have a c compiler on my computer. As a stand-alone program, does it do anything more than reproduce the R+jL values displayed in by FastHenry?

There are two other utility programs supplied: MakeLcircuit and MakeLnegative. MakeLcircuit is in 2.2.2 of the FastHenry manual, but I can not find MakeLnegative details anywhere. Can you assist?


David Lee
Power Electronics, UK
Enrico Posted - Sep 25 2007 : 18:05:32
Wait, wait! Please don't mix different problems together.

Let's first make some clarity about types of files. The default output file from FastHenry is called Zc.mat. This file contains 'raw' data, in the sense that results are in the format R+j*w*L, where R is resistance, L is inductance, w is 2*f*pi (where f is frequency and pi = 3.1415...)

To have data in more readable and useful format, you can use the utility program 'ReadOutput', which will output the results in the more common R+jL format.

FastHenry visualization just uses ReadOutput internally to provide you with the results directly, avoiding you one passage.

As a matter of fact, if you take your results for 1e+7:

Impedance matrix for frequency = 1e+007 2 x 2
0.00177828 +0.233901j 0.00115711 +0.146311j
0.00115721 +0.146303j 0.00268639 +0.291363j

and divide the imaginary part by 2*1e7*3.1415 you get exactly

0.00177828 +3.72265e-009j 0.00115711 +2.32861e-009j
0.00115721 +2.32849e-009j 0.00268639 +4.63719e-009j

that is the result in FastHenry.

The format of Zc.mat and the usage of ReadOutput are detailed in the FastHenry User's guide, paragraph 2.2, 'Processing the Output'

Please be always sure to have read the User's guide thoroughly, it will save you from committing errors.

On other points, see the 'get_new_x_y: Vector never hits edge of box?' topic.

Hope this clarifies
Enrico



FastFieldSolvers Forum © 2020 FastFieldSolvers S.R.L. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.06