Hi,
I try to simulate the current diffusion in a conductor and started with a simple testcase (straight wire). The initial condition is zero current and the boundary condition is a potential step at one end.
The expected behavior is to see the current conduction starting at the outer surface of the wire. The current density more at the center should be delayed.
This works if I set the BDF order to 1. The second timestep current density, for example, is:
Setting the BDF order to 2, the current density starts at the side of the potential step and kind of "propagates" down the wire:
This is unexpected and the solution also seems to violate div(J) = 0 (just from the pictures, didn't calculate it). Maybe I violate some requirements of the BDF solver so I'd usually think it is my fault.
However, using BDF Order = 1 and and an adaptive timestep, the result is rather similar to the fixed timestep with order = 2. I don't understand why. (No image because only 3 files can be attached? All images can be found in the attached archive.)
I also tried a smoother tanh-step a little bit later (not immediately at the simulation start) just in case the immediate step somehow conflicts with the initial condition, but the result shows the same problem.
Elmer version is: Version: 9.0 (Rev: 6ab20a47, Compiled: 2021-11-21), Compiled on Debian 11.
The complete testcase including the sif, mesh files and pictures is attached.
Unexpected behavior of (adaptive) BDF time stepping (with WhitneyAVSolver)
Unexpected behavior of (adaptive) BDF time stepping (with WhitneyAVSolver)
- Attachments
-
- testcase.tar.gz
- (500.57 KiB) Downloaded 111 times
-
- Posts: 2312
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Unexpected behavior of (adaptive) BDF time stepping (with WhitneyAVSolver)
Immediate reaction from the images is that the mesh is too coarse for meaningful results, I would try some mesh refinement, or higher order elements before proceeding. Unfortunately iterative solutions can arrive at an end result without converging to a meaningful solution, leading to an impression that the case is 'solved'
Re: Unexpected behavior of (adaptive) BDF time stepping (with WhitneyAVSolver)
By decreasing time step size and increasing number of steps like this:
Making the same change with adaptive time steps did not help.
BTW, trying second order edge elements didn't help either.
Hope this helps, Rich.
then both BDF Order = 1 and BDF Order = 2 give similar results that look like the desired results. Also both orders now have the same peak current density magnitude of 5.2e5.Timestep Sizes(1) = 1e-7
Timestep Intervals(1) = 30
Making the same change with adaptive time steps did not help.
BTW, trying second order edge elements didn't help either.
Hope this helps, Rich.
-
- Posts: 2312
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Unexpected behavior of (adaptive) BDF time stepping (with WhitneyAVSolver)
Thanks Rich,
Smaller time steps and smaller elements almost always help any problem. When you look at a contour of results it should be smooth not jagged.
Smaller time steps and smaller elements almost always help any problem. When you look at a contour of results it should be smooth not jagged.
Re: Unexpected behavior of (adaptive) BDF time stepping (with WhitneyAVSolver)
I just used such a coarse mesh for the uploaded example to keep the file size down. It happens with finer meshes, too.kevinarden wrote: ↑07 Dec 2021, 00:21 Immediate reaction from the images is that the mesh is too coarse for meaningful results, I would try some mesh refinement, or higher order elements before proceeding.
Hm. Setting the timestep settings to
Code: Select all
Timestep Sizes(1) = 1e-7
Timestep Intervals(1) = 30
The adaptive timestep result seems to be the worst of all with 1e-7 timestep (no pictures attached).
- Attachments
-
- bdf2.gif (475.18 KiB) Viewed 1113 times
-
- bdf1.gif (693.55 KiB) Viewed 1113 times
Re: Unexpected behavior of (adaptive) BDF time stepping (with WhitneyAVSolver)
Hello,
attached are two animations and two solver logs, for each of the bdf cases, also the sif files.
Note the animations show current density magnitude, not current density e magnitude. Also the geometry was converted from gmsh msh format to elmer format using ElmerGui, which is the equivalent to 'elmergrid 14 2 inputfilename -autoclean'. This step renumbered the boundaries.
Windows 10, Version: 9.0 (Rev: Release, Compiled: 2021-11-22
Rich.
attached are two animations and two solver logs, for each of the bdf cases, also the sif files.
Note the animations show current density magnitude, not current density e magnitude. Also the geometry was converted from gmsh msh format to elmer format using ElmerGui, which is the equivalent to 'elmergrid 14 2 inputfilename -autoclean'. This step renumbered the boundaries.
Windows 10, Version: 9.0 (Rev: Release, Compiled: 2021-11-22
Rich.
- Attachments
-
- mytry1.7z
- (146.76 KiB) Downloaded 101 times
Last edited by Rich_B on 08 Dec 2021, 16:08, edited 1 time in total.
-
- Site Admin
- Posts: 4828
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Unexpected behavior of (adaptive) BDF time stepping (with WhitneyAVSolver)
Hi
A challenge in the AV solver is that the current source or whatever terms we get on the r.h.s. should always be divergence free. I wonder if there is something in the higher order schemes that results to fishy source terms. We have not used higher order too much for the AV solver ourselves as a main application field has been related to rotating machines and there higher order accuracy is anyways spoiled by the rotating parts. For EM wave solver higher order schemes worked well.
Have you tried the opposite of very small timesteps I guess rather long timesteps should be ok since the system approaches steady state which is ok.
-Peter
A challenge in the AV solver is that the current source or whatever terms we get on the r.h.s. should always be divergence free. I wonder if there is something in the higher order schemes that results to fishy source terms. We have not used higher order too much for the AV solver ourselves as a main application field has been related to rotating machines and there higher order accuracy is anyways spoiled by the rotating parts. For EM wave solver higher order schemes worked well.
Have you tried the opposite of very small timesteps I guess rather long timesteps should be ok since the system approaches steady state which is ok.
-Peter
Re: Unexpected behavior of (adaptive) BDF time stepping (with WhitneyAVSolver)
@Rich: Thank you for checking the testcase with your installed version. Seems to have the same problem.
@Peter:
I just checked with a timestep of 1e-4. Is does converge to a meaningful constant stationary value. The transient part, however is still messed up and observing the transient behavior is the point of this simulation.
If a BDF order > 1 is a problem, why doesn't it work with adaptive timestepping and BDF order set to 1? Can the adaptive timestepping also mess up the divergence?
@Peter:
I just checked with a timestep of 1e-4. Is does converge to a meaningful constant stationary value. The transient part, however is still messed up and observing the transient behavior is the point of this simulation.
If a BDF order > 1 is a problem, why doesn't it work with adaptive timestepping and BDF order set to 1? Can the adaptive timestepping also mess up the divergence?