Skip to Content.
Sympa Menu

opal - [Opal] quaternion isn't unit quaternion. Norm: -nan

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

[Opal] quaternion isn't unit quaternion. Norm: -nan


Chronological Thread  
  • From: Christopher Pierce <cmpierce AT uchicago.edu>
  • To: "opal AT lists.psi.ch" <opal AT lists.psi.ch>
  • Subject: [Opal] quaternion isn't unit quaternion. Norm: -nan
  • Date: Tue, 4 Apr 2023 03:53:51 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uchicago.edu; dmarc=pass action=none header.from=uchicago.edu; dkim=pass header.d=uchicago.edu; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=U1HxIAd4dlCKqn/yfcOfHbkAYNpjvrAzLDCq6X2PE54=; b=Vyh9iTpBBKU6zSi1tCN18x3P7a4TR0eV4WJ5+40L+crdG8MDeBuruJ8WSWKYKrBMTL1gvjf8YXQIxOazjuCUVNIqhA3iYZwLW2FowZZoeue6nnGqCFEh5Bv3GDtJHNvfQgLbJvu1JNB7ycyb7vwHetFnQ/BF6Xv+y/coX36062FQ8Nzo35TcNuEsyitXOnhIJRIwgpChZLKGPIP/uKEHs92yJ7mIvXVTcQw6gh8npCrt5BTzxJB5Q8yLx6OyapKZ1k0vZ6n9PwyUxmZRpsaBwFehJcSENCPPaDy83uTe7roLAlzCbz17Prp1kjSyblMeMpLUw9Pc9L9ppVLVQJp5DQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aakCgIe4w6TdlrOtbZDOaNY/CqLq06ZDYHytlCM/NNvisVIG1O6cFJlnt56EIV/ewrxUJqnvoQ1niO7IF9j20R0gRW0WfGZyO3c55/60u8FxQe1EIp2l4gSwCIWaFAvxPySqoAt14qH1zmTmPcv2sQ9UzyfqczQDtY31FYCVR1qp2wMD8WDFVNfYCBQjGmOZ0opjFSvH6BUObFS9wz9thdbGRwa1nWGbdCfpoKJWtJgW5HUxwL8fD3mMxpjI++bWjFXNQfkBhx8IDIINV6Pze2Kh7nHmD/78TwgkRVdRAIhSe5TTXpbwcOAT0gw6d0saAHlzrv8mQVs1ksK8XdbGFA==
  • Authentication-results: mc4.ethz.ch; iprev=pass (mail-dm6nam10on2137.outbound.protection.outlook.com) smtp.remote-ip=40.107.93.137; spf=pass smtp.mailfrom=uchicago.edu; dkim=pass header.d=uchicagoedu.onmicrosoft.com header.s=selector2-uchicagoedu-onmicrosoft-com header.a=rsa-sha256; dmarc=pass header.from=uchicago.edu
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=uchicago.edu;
  • Msip_labels:

Hey folks,

First, I have recently started using opal and wanted to thank you for it. It looks like it will be very useful for my research.

I am emailing because I am running into a problem with the attached input file. It is supposed to represent a beam in a artificial electrostatic focusing channel. I do this by loading a fieldmap into the simulation with a constant negative radially pointing E-field and no Ez component.

The problem I encounter is that after loading the input file, the program returns the error "quaternion isn't unit quaternion. Norm: -nan". 

I found out that I can make the error go away by setting a single element of the fieldmap to have finite Ez (also attaching the file as "e-lens-fixed.T7". This fieldmap seems to give me the results I expect. Is there something that I am doing wrong here?

Cheers,

Chris Pierce
OPTION, PSDUMPFREQ = 300; // 6d data written every 300 time steps (h5).
OPTION, STATDUMPFREQ = 10; // Beam Stats written every 10 time steps (stat).
OPTION, BOUNDPDESTROYFQ=10; // Delete lost particles, if any
OPTION, VERSION = 20300; // This indicates that it works with an OPAL
version of 2.3

Title, string="AWA Photoinjector";

//----------------------------------------------------------------------------
//Global Parameters

REAL rf_freq = 1; //RF frequency. (MHz)
REAL n_particles = 1E4; //Number of particles in simulation.
REAL beam_bunch_charge = 1e-9; //1e-9; //Charge of bunch. (C)

// Complete accelerator
lens: RFCAVITY, TYPE=STANDING, FREQ=0, ELEMEDGE=0, L=6.28, VOLT=1e-11,
FMAPFN="e-lens-fixed.T7";
DRIVE: Line = (lens);

Dist: DISTRIBUTION, TYPE = BINOMIAL,
MX = 1e6,
MY = 1e6,
MZ = 0.5,
SIGMAX = 1e-3,
SIGMAY = 1e-3,
SIGMAZ = 1e-3,
SIGMAPX = 1e-4,
SIGMAPY = 1e-4,
SIGMAPZ = 0.0,
OFFSETZ = 1e-3;

FS_SC: Fieldsolver, FSTYPE = FFT,
MX = 16, MY = 16, MT = 16,
PARFFTX = False,
PARFFTY = False,
PARFFTT = True,
BCFFTX = open,
BCFFTY = open,
BCFFTT = open,
BBOXINCR = 4,
GREENSF = INTEGRATED;

BEAM1: BEAM, PARTICLE = ELECTRON, NPART = n_particles, ENERGY=0.001,
BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq, CHARGE = -1;

TRACK, LINE = DRIVE, BEAM = BEAM1, MAXSTEPS = 1900000,
DT = {3.0e-12}, ZSTOP={6.28};

RUN, METHOD = "PARALLEL-T", BEAM = BEAM1,
FIELDSOLVER = FS_SC, DISTRIBUTION = Dist;
ENDTRACK;

Quit;

Attachment: e-lens.T7
Description: e-lens.T7

Attachment: e-lens-fixed.T7
Description: e-lens-fixed.T7




Archive powered by MHonArc 2.6.24.

Top of Page