# Spatial periodicity of the stochastic Stokes

**URL:** <https://community.freefem.org/t/spatial-periodicity-of-the-stochastic-stokes/4384>\
**Category:** General Discussion\
**Created:** [October 10, 2026, 1:59am UTC](https://community.freefem.org/t/spatial-periodicity-of-the-stochastic-stokes/4384 "2026-10-10T01:59:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sylvia](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/sylvia/32/3751_2.png) [@Sylvia](https://community.freefem.org/u/Sylvia)\
**Post date:** [October 10, 2026, 1:59am UTC](https://community.freefem.org/t/spatial-periodicity-of-the-stochastic-stokes/4384/1 "2026-10-10T01:59:18Z")

</div>

Hello everyone. I am unsure how to implement the spatial periodicity of u and p in the convergence-order code.

 ![594c44c0eb69dca329b13472bc9d10da](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/f/f725099db5a220c33bd5d7eff8cc48be29630660.jpeg)

The authors do not mention this spatial periodicity in their numerical experiments, though they provide a detailed explanation in another paper on the same model.

 ![425676f21429b0222675556956fd9d48](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/2/2756ce80e7ca85820e93bfb83a5c75f9b61325a2.jpeg)  
Attached are the screenshots and the paper. Any suggestions would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)\
**Post date:** [October 10, 2026, 9:20am UTC](https://community.freefem.org/t/spatial-periodicity-of-the-stochastic-stokes/4384/2 "2026-10-10T09:20:59Z")

</div>

Hello,  
There is nothing special about the periodicity here, you just take periodic finite element spaces for u and p. You have to care of the invariance of p by adding a constant, for example by adding \int\varepsilon pq in the variational formulation (if you use the Chorin projection method you don’t need that). The periodicity is specified by (for example for a rectangle with boundary labels 1,2,3,4 corresponding to bottom, right, top, left)  
`fespace Vh(Th,P2,periodic=[[1,x],[3,x],[2,y],[4,y]]);`

`fespace Ph(Th,P1,periodic=[[1,x],[3,x],[2,y],[4,y]]);`

Here the boundary with labels 1 and 3 are identified, x being the coordinate that parametrizes the position.

The boundary with labels 2 and 4 are identified, y being the coordinate that parametrizes the position.
