Comments (6)
Here is an example of input file (one has to remove the .txt extension) that illustrates what I mean.
l2freeboundaryexample_L0.sp.txt
from spec.
As identified by @SRHudson , the problem is that the angle constraint coefficient sweight , which is defined in preset.h, was proportional to tflux in each volume. However, in free-boundary and e.g. Lconstraint=0, the toroidal (and poloidal) flux in the outermost volume, namely the vacuum volume, is modified in order to ensure the constraint of the linking current(s). Thus, when force-balance is obtained, the restart .end file contains a converged geometry but the value of tflux (which is the one initially in the input) has not changed, so that when the code is run again with this new file as input, the part of the force-balance that corresponds to the angle constraints is not converged. For example, one gets initially:
newton : 6.03 : 0 0 ; |f|= 5.43747E-03 ; time= 5.87s ; log|BB|e=-16.44
newton : : ; ; log|II|o= -3.10
from spec.
One way to fix this, as proposed by @SRHudson, is to remove the dependency of sweight on tflux,
SALLOCATE( sweight, (1:Mvol), zero )
!sweight(1:Mvol) = upsilon * tflux(1:Mvol)**wpoloidal
do vvol = 1, Mvol ; sweight(vvol) = upsilon * (vvol*one/Nvol)**wpoloidal
enddo
from spec.
I created a branch called fixrestart and applied this change. I checked that the code compiles and runs, and that the restart problem has been indeed fixed.
An important caveat is that the angle constraint (and therefore the angle definition itself) is different than before, even if running the same case. That makes comparison with previous runs very hard: the physical solution should not change, but for example the harmonics Rmn,Zmn,etc. will be different.
from spec.
One alternative would be to keep the definition of sweight as before and write in the .end file the new values of tflux that have been calculated during the previous run.
from spec.
Problem solved via the branch fixrestart. Closing issue.
from spec.
Related Issues (20)
- GMRES error HOT 10
- Segmentation faults when compiled with cmake HOT 6
- Problem with master branch HOT 4
- Issue when restarting from .end file HOT 6
- Help needed to install python wrappers HOT 15
- Wrapper will not compile (reserved python words?) HOT 3
- Problem running tests on master branch HOT 3
- python_wrapper Makefile setup HOT 2
- Help needed for compilation with cmake HOT 8
- Question about force-gradient HOT 4
- Bug in force gradient when Lrzaxis=1 ?
- MATLAB metric subroutine needs fix HOT 2
- Python wrapper compilation for Henneberg representation branch HOT 2
- VMEC initializer HOT 2
- Read initial guess with python wrappers HOT 5
- Cannot install f90wrap HOT 7
- Question about matrix free method HOT 2
- SPEC license? HOT 5
- Installation on mac m1 HOT 16
- py_spec installation is borken HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spec.