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
![2](https://private-user-images.githubusercontent.com/132244694/330470631-68015cae-001e-42f4-940c-02c6ddfc7008.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzA1NjQsIm5iZiI6MTczOTI3MDI2NCwicGF0aCI6Ii8xMzIyNDQ2OTQvMzMwNDcwNjMxLTY4MDE1Y2FlLTAwMWUtNDJmNC05NDBjLTAyYzZkZGZjNzAwOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQxMDM3NDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01M2MzODM5MGQ3OTA2ODU5NWVjZDhjMGJlNWU0NTY5N2E3NDM1ODhlMWQxYTRkMGE4ZDc1NDhjMGQxMmFiNmI4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.EOO9LO_vlLv6rrGKoXISIdlezTS0LUcV7vpoOa_ZgS8)
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