From: Steffen Petersen <steffen.petersen@tu...>  20050318 00:18:22

Sorry for the late reply, I have been on a short vacation + conference trip. Rolf Mueller wrote: > Dear libmesh developers and users, > > I would like to obtain complex (i.e., real and imaginary) field values > for a problem with an unbounded domain. > > I have been looking into the libmesh example no. 6 (ex6) in order to > see how to use libmesh's infinite elements. I have also read the paper > on the wave envelope elements by Astley et al. > (J. Acoust. Soc. Am. 103, 4963, 1998) and perused the paper by Dreyer > et al. (Int. J. Numer. Meth. Engng. 58, 933953, 2003). > > In the paper by Astley et al., the contributions of the infinite > elements to the system matrix appear to be complex; Eq. 33 of the > paper states they should be: > > K+jkCk^2M, > > where K,C,M are the stiffness, damping, and mass matrix respectively, > k is the wavenumber (w/c), and j the imaginary unit. > > If I look at examples/ex6/ex6.C, I see that the element contributions > to the system matrix are assembled as > > Ke.add(1./speed , Ce); > Ke.add(1./(speed*speed), Me); > The real part of the damping matrix Ce seems to be  in general  > nonzero, whereas the imaginary part seems to be always zero (I have > configured libmesh with the "enablecomplex"flag). So it seems that > Ce is just added to a real system matrix. In addition, the sign of Me > appears to be the opposite of what I would have expected from Eq. 33 > in Astley et al. The reason for the confusions is that in example 6 the matrix assembly is done according to transient simulations (cf. part II of the Astley paper; however, no time stepping scheme is accomplished here). To obtain the system matrix for solving the Helmholtz equation (as is done in the papers you mention) you may simply change the factors for K, C and M, e.g.: const Complex scale_damping ( 0., k ); const Complex scale_mass (k*k, 0.); Ke.add(scale_damping, Ce); Ke.add(scale_mass , Me); If you have compiled the code with enablecomplex, the system matrices, rhs and solution will always be complex (also in the example programs covering real valued problems). > ex6 seems to compute a complex result, the "System "Wave" Solution > Vector" written to the file "eqn_sys.dat" is twice as long as the > number of nodes. However, the values (real and imaginary) seem to be > always zero, even if not all nodes are part of infinite elements (I > have been using meshe sizes up to 20x20x20). I just ran the example program and could not reproduce your problems. The vector contains complex data due to the configuration, where the imaginary part is zero since matrix and rhs are real. Here are the first lines of the eqn_sys.dat file I get: 1 # No. of Equation Systems Wave # Name, System No. 0 LinearImplicit # Type, System No. 0 1 # No. of Variables in System "Wave" p # Name, Variable No. 0, System "Wave" 1 # Approximation Order, Variable "p", System "Wave" 3 # Radial Approximation Order, Variable "p", System "Wave" 0 # FE Family, Variable "p", System "Wave" 12 # Radial FE Family, Variable "p", System "Wave" 0 # Infinite Mapping Type, Variable "p", System "Wave" 0 # No. of Additional Vectors, System "Wave" 419 # vector length x 2 (complex) 8.491741e03 0.000000e+00 1.204387e02 0.000000e+00 1.606009e02 0.000000e+00 1.204387e02 0.000000e+00 8.491741e03 0.000000e+00 1.204387e02 0.000000e+00 2.047754e02 0.000000e+00 1.793855e02 0. > Could somebody please help me understand what is being done here and > how I can get a physically meaningful result for the (finite) nodes?  The nodal data within the finite element region should be physically meaningful. Only for evaluation of results in the infinte domain special treatment is necessary. Steffen > I am thankful for any input. > > Kind regards, > Rolf > > >  > SF email is sponsored by  The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 