Replies: 3 comments 2 replies
-
The coefficients of your equations are very nonlinear functions of the solution variables. Ideally, you should sweep until the residual no longer decreases. In your case, I find 50 to 100 sweeps are necessary for that to happen, which is a lot. You can try taking smaller time steps or you can evaluate the solutions after fewer sweeps (maybe 5 or 10) and see if the solutions are acceptable. The interplay between time steps and sweep counts are more art than science. |
Beta Was this translation helpful? Give feedback.
-
With only 1 sweep I get the expected and acceptable result which was mostly calculated using finite difference scheme in many literature article and I am getting same results changing timestep from 4 fs to 1 fs to 0.5 fs. Will you please guide me how to modify my code to check how the residual is decreasing with every sweep ? |
Beta Was this translation helpful? Give feedback.
-
Now I have changed the equations from eq_e=TransientTerm(coeff=gamma1+gamma2*T_e, var=T_e)==DiffusionTerm(coeff=K_e, var=T_e)-ImplicitSourceTerm(coeff=G, var=T_e)+ImplicitSourceTerm(coeff=G, var=T_p)+ImplicitSourceTerm(coeff=S/T_e,var=T_e)
eq_p=TransientTerm(coeff=C_p, var=T_p)==ImplicitSourceTerm(coeff=G, var=T_e)-ImplicitSourceTerm(coeff=G, var=T_p) to eq_e=TransientTerm(coeff=1, var=T_e)==DiffusionTerm(coeff=K_e/C_e, var=T_e)-ImplicitSourceTerm(coeff=G/C_e, var=T_e)+ImplicitSourceTerm(coeff=G/C_e, var=T_p)+ImplicitSourceTerm(coeff=S/(C_e*T_e),var=T_e)
eq_p=TransientTerm(coeff=1, var=T_p)==ImplicitSourceTerm(coeff=G/C_p, var=T_e)-ImplicitSourceTerm(coeff=G/C_p, var=T_p) I find that |
Beta Was this translation helpful? Give feedback.
-
I want to solve these coupled equations
This is the code I wrote
Now when the sweep number is 1 I get expected result (similar to the result reported in the literature) but when I change sweep number to 2 I get drastically different result. It seems that the effect of sweep number is divided into two sequence, odd number sequence and even number sequence. In the sweep number 1 among the odd number sweep is giving highest value and 2 among even is giving lowest value. Odd number sweeps give decreasing result and even number sweeps give increasing results. After 20-21 sweep the results converged to a stable result. Why is that happening?
Beta Was this translation helpful? Give feedback.
All reactions