ProjectTorreyPines / QED.jl

Q Evolution by Diffusion
https://projecttorreypines.github.io/QED.jl/dev
Apache License 2.0
0 stars 0 forks source link

Create initialize routine for external interfacing #4

Closed bclyons12 closed 2 years ago

bclyons12 commented 2 years ago

Will this serve for interfacing as desired?

orso82 commented 2 years ago

I think so! Thanks.

TimSlendebroek commented 2 years ago

@bclyons12 @orso82 I ran the following to test this in FUSE

par = Parameters(:ITER, init_from=:ods)
dd = IMAS.dd()
FUSE.init(dd,par); 

currentactor = FUSE.QEDcurrentActor(dd)
p=plot()
for k in 1:3
    display(k)
    FUSE.step(currentactor,0.1,100,resume=true)
    FUSE.finalize(currentactor);
    dd.global_time=dd.equilibrium.time[end]
    plot!(p,dd.equilibrium.time_slice[].profiles_1d.rho_tor_norm, dd.equilibrium.time_slice[].profiles_1d.j_tor,label=@ddtime(dd.equilibrium.time))
end
display(p)

This resulted in

image

The log rule is somehow not propagated or I am creating the actor in a wrong way.

git log to show I had the latest:

image

bclyons12 commented 2 years ago

It looks like FUSE is still using it's own version of η_imas:

https://github.com/ProjectTorreyPines/FUSE.jl/blob/db0304bcbbd01c0cea5e1acdda2fd59720b67eb9/src/actors/current_actor.jl#L74-L78

That should get deleted and called from QED

orso82 commented 2 years ago

I see that the version of η_imas from QED takes a dictionary as input. Could you please add another version of η_imas that simply takes the arrays? We can then both call that same function.

orso82 commented 2 years ago

mention https://github.com/ProjectTorreyPines/FUSE.jl/commits/master