3D plotting with nedelec element

hello sir,
i am facing a problem in plotting 3D and I am using nedelec element.

import dolfin
from dolfin import*

import matplotlib.pyplot as plt

mesh = UnitCubeMesh(20, 20, 20)

V=FunctionSpace(mesh, "Nedelec 1st kind H(curl)", 1)

u=TrialFunction(V)
v=TestFunction(V)

f=Expression(("x[0]", "x[1]", "x[2]"), degree=1)


a=inner(curl(u), curl(v))*dx
b=inner(f, curl(v))*dx
#import numpy as np
#A=assemble(a)
#B=assemble(b)
u=Function(V)
solve(a==b, u)
plot(u)
plt.show()

I’m not sure what you’re trying to achieve here.
Your variational form doesn’t seem to be well defined.

Can you elaborate a bit more on the problem you are facing?

2 Likes

Thank you for your reply.
was reading the article “INCOMPRESSIBLE MIXED FINITE ELEMENTS FOR THE STOKES’E~UATION IN IR 3”, in that article they used inner (curl(w), curl(v))*dx= inner(f,v)*dx, where w is vorticity. And they used 3d nedelec element as a test and trial function. here am attaching the article you can find the variational form in equation 6.

Hi @gangadhara,

I think a bondary condition is missing. For example:
u \wedge n = 0 on some boundary \Gamma of your computational domain.
I guess that would be just a Dirichlet BC for Nedelec elements.

See for example the the definition of the Hilbert space (just above the equation 6).

1 Like