Respected Professors and Experts,
Hope you are all fine!. I am currently trying to get the optimal order of convergence in the following KS equation in standard FEM. I have tried the codes in two ways: 1) by using a semi-implicit scheme for the nonlinear convection term and 2) using Picard iteration to linearize the nonlinear convection term.
Here is the KS equation>
Here is my code >
- First Code:
KS_FEM.edp (3.3 KB)
(Here, I have used a semi-implicit scheme for the convection term and alpha=1 in the second equation of (1)).
Results of KS_FEM.edp:
- Second Code:
FEM_KS_NL.edp (4.1 KB)
(Using Picard’s fixed point method)
Results of FEM_KS_NL.edp:
A detailed paper in DDG KS:
DDG_KS_2024.pdf (529.9 KB)
(In this paper, there is LF flux (equation (2.12)) at the top of page no. 7) for the convection term, I am getting difficulties writing global alpha, sir, but I have tried like the following:

My code to write global alpha:
// 1. Define an edge-based finite element space on your mesh (Th)
fespace VhEdge(Th, P0edge);
// 2. Define a macro or variable for your specific normal flux (c_h)_n.
// Note: You must replace the inside of this macro with your actual formulation
// from (2.11b) using FreeFem++ DG syntax (e.g., using mean(), jump(), N.x, N.y).
// Usually, this is evaluated using the known solution from the previous time step/iteration.
//macro chn() ( /* e.g., mean(dx(ch))*N.x + mean(dy(ch))*N.y */ ) //
macro wn() (mean(dx(ch))*N.x + mean(dy(ch))*N.y) //
// 3. Declare a P0edge variable and assign it the absolute value of the flux
VhEdge alphaLocal = abs(wn);
// 4. Use the built-in array method '.max' to find the global maximum across all edges
real alphaGlobal = alphaLocal[].max;
// Now you can use alphaGlobal as a constant in your variational formulation
Is this code correct for this global alpha??.
I expect second order convergence in space and first order in time in KS_FEM.edp and FEM_KS_NL.edp. I would be sincerely grateful if I could receive some kind guidance and support in helping me achieve the optimal convergence order for this problem.
Thanks and regards,
Monirul Islam




