# How do I specify a boundary condition with curl?

**URL:** <https://community.freefem.org/t/how-do-i-specify-a-boundary-condition-with-curl/144>\
**Category:** General Discussion\
**Created:** [October 1, 2019, 6:16pm UTC](https://community.freefem.org/t/how-do-i-specify-a-boundary-condition-with-curl/144 "2019-10-01T18:16:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![linwaytin](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@linwaytin](https://community.freefem.org/u/linwaytin)\
**Post date:** [October 1, 2019, 6:16pm UTC](https://community.freefem.org/t/how-do-i-specify-a-boundary-condition-with-curl/144/1 "2019-10-01T18:16:54Z")

</div>

I’m solving TDGL on a 2D circular domain.  
I don’t know how to specify the boundary condition for the vector potential A.  
One of the BC is that curl A = B, where B is the given magnetic field.  
In the variational form, this becomes a line integral along the boundary.  
But the line integral contains dot product, how should I deal with this?

Thank you.

---

<div class="post-metadata">

**Author:** ![denis.crete](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@denis.crete](https://community.freefem.org/u/denis.crete)\
**Post date:** [January 4, 2020, 9:46pm UTC](https://community.freefem.org/t/how-do-i-specify-a-boundary-condition-with-curl/144/2 "2020-01-04T21:46:32Z")

</div>

Hello,  
it might help you to look at the following couple of lines (part of “problem” definition) :  
// boundary condition on superconductor: B is perpendicular to the surface, Bn=0  
+ int1d(Th,1,2)((-dy(Aphi)\*N.x+dx(Aphi)\*N.y)\*v)  
that I have used for a curved superconducting boundary in a cylindrical geometry.  
The applied magnetic field was along Oz, the axis of revolution of the system. So vector potential is orthoradial, i.e. only Aphi is non zero.  
HTH  
Denis
