Skip to content

Passing vector potential through external_vector_potential isn't working #5

Description

@Shiva-Konakanchi
import numpy as np
from svirl import GLSolver
import seaborn as sns
import matplotlib.pyplot as plt

gl = GLSolver(
    dx = 0.5, dy = 0.5,
    Lx = 64, Ly = 64,
    order_parameter = 'random',
    random_seed = 4,
    homogeneous_external_field = 0.05,
    external_field = 0.00,
    gl_parameter = 5.0,  # np.inf
    normal_conductivity = 200.0,
    dtype = np.float64,
)

aax = gl.vars.vector_potential[0]       # store the vector potential for uniform field for future use
aay = gl.vars.vector_potential[1]

gl.solve.td(dt=0.01, Nt=10000)            # Now do the time evolution
gl.solve.cg(n_iter = 1000)

heat = sns.heatmap(gl.observables.superfluid_density, cmap="CMRmap_r", vmin=0, vmax=1)
heat.invert_yaxis()
plt.savefig('1.png')

Produces this output:
1

However, passing A produces different output as shown below:

ginz = GLSolver(                            
    dx = 0.5, dy = 0.5,
    Lx = 64, Ly = 64,
    order_parameter = 'random',
    random_seed = 4,
    homogeneous_external_field = 0.00,
    external_field = 0.00,
    gl_parameter = 5.0,  # np.inf
    normal_conductivity = 200.0,
    dtype = np.float64,
)

ginz.params.external_vector_potential = (aax, aay) # aax and aay are obtained from the piece of code above

ginz.solve.td(dt=0.01, Nt=10000)            # Do the same time evolution as before
ginz.solve.cg(n_iter = 1000)

heat = sns.heatmap(ginz.observables.superfluid_density, cmap="CMRmap_r", vmin=0, vmax=1)
heat.invert_yaxis()
plt.savefig('2.png')

2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions