tvelliott / jPCBSim

Front-end and post processing software for simulating planar RF filters and antennas with the openEMS FDTD field solver.
BSD 3-Clause "New" or "Revised" License
26 stars 2 forks source link

ParaView animation issue #1

Closed donatled closed 5 years ago

donatled commented 6 years ago

Re jPCBSim - Is there a secret to getting the animation to work in ParaView? After OpenEMS running for 30 min on the IFA example, the vtp file is only 20K. It opens in Paraview as a single colour mesh with only 1 time step.

tvelliott commented 6 years ago

Running the latest version of openEMS does appear to segfault on the output from jPCBSim. I will look into this. It is most likely some new sections that are missing from the xml simulation file.

~/opt/openEMS/bin/openEMS ~/opt/Projects/7ghz_lpf/openems_simulation.xml --engine=basic --numThreads=3 -vvv

Property #15 Type: "ProbeBox" Name: "port_it1" Primitive Count : 1 Coordinate System : 0 -- Primitives: -- Primitive #15 Type: "Box" Priority: 999 Primary Coord-System: 2 Mesh Coord-System: 0 Bound-Box Coord-System: 0 Bounding Box (Valid: 1): P1: (0.15043,0.05595,0.0001778) P2: (0.15055,0.05607,0.0001778) Transform: None Start: 0.15043,0.05595,1.7779999999999998E-4 Stop : 0.15055000000000002,0.056069999999999995,1.7779999999999998E-4 Create FDTD operator Operator::CalcTimestep_Var3: Smallest timestep (4.58052e-14s) found at position: 1 : 111;41;11 Segmentation fault

tvelliott commented 6 years ago

I found that the segfault is being caused by something that the later versions of openEMS doesn't like about the LorentzMaterial type. You can turn this off by un-checking the box for "Use Dispersive Characteristics" on the Airbox/Mesh tab. The simulation should run fine. I will continue to work on this issue. The example simulation shouldn't take anywhere near 30 minutes to run, so I think this was the issue you encountered.

About viewing in Paraview: After you first start the simulation, openEMS dumps the copper mesh to a file so you can verify that the meshed copper looks correct. This is what the solver is operating with. The "View PEC" option will open Paraview and open the copper dump file. After Paraview opens, You should see "PEC_dump.vtp" file opened. Click on "Apply" to view it.

To view an animation of the e-field, you need to select "Dump E-Field VTR format" in the Simulation Tab. The files will be generated throughout the simulation as it runs. After enough files are available for an animation, open->file in Paraview and look for Et__.vtr in the project directory and select it. Click on "Apply". Under "Coloring" select "E-Field" (by default it is solid color). Now you can click on the Play icon to view the animation. You may find it useful to play with the scaling options under the Coloring section.

I'll leave this issue open until I solve the problem with the LorentzMaterial (dispersive characteristics) option.