Problem with Transient Heat Source (using swak4Foam expression Source)
2 Attachment(s)
Hi FOAMers,
I am solving energy equation for laser annealing problem. The equation I'm solving is as follows: fvm::ddt(rhoCp, T) - fvm::laplacian(K,T) - rhoCp*VX*dtdx == heatSource(); Vx= velocity of the frame(I'm moving the the frame instead of source). Cp & K is function of temperature. Now, I'm calculating heatSource() using swak expression source(laser heat source) Q= P*mu*(1-R)* exp(-mu*Z)*exp(-X^2/r^2); where, P = total power mu = absorption co-efficient R = Reflection. Both mu and R is function of temperature. Now, when I run the simulation I get the temperature value unusual(huge value!!!). I have also run the simulation taking mu as constant, in this case it gives reasonable value. Does any one had solve this type of problem? Thanks in advance . shakil |
Quote:
1. Is the temperature dependence in such a way that there is a positive feedback? Calculating by hand (or using some program that solves ODEs) for one cell might give hints 2. The explicit nature of the coupling might be a problem. Try to run the simulation with a timestep that is a tenth of the one you're currently using. If the results are approximately the same your physical model has a problem. If the problem is ten times smaller then you have a discretization problem |
Hi Gschaider,
Thank you for the answer. I guess it may be the explicit nature of coupling. I'm checking with the hints you suggested. |
Hi,
Just figured out the problem is coming from the "mu" which is absorption coefficient. In my case, mu varies with the temperature with power law: mu = mu0*(T/T0)^1.2 where, mu0 = is the initial absorption T0= is the initial temperature (300K) Now, when I used this relationship in the heat source equation it causes the problem. Does any one have idea to deal with such situations??? |
Quote:
Code:
muPerT=mu0*(1/(T*T0))^1.2 Code:
fvm::Sp(muPerT,T) I THINK (haven't tried yet) that you can still use an expressionSource for muPerT. Ah. And probably the physics in my example is wrong. That is your responsibility |
dimensian problems
Dear All,
I try to use this feature of swak, but I have the following problem. When I try to run the case, my source term is complaining that pos.x() and T has dimensions, while the source term should not have? I'm using OF 2.1 and Swak4Foam_2.x_release_0.2.2/ Why this is so? Thanks, Lilla PS: my source term is depending on position and temperature. |
Can you please explain a bit detail of your problem? Because, if the source term is a function of position and temperature, it may have dimensions.
Cheers #shakil |
Dear Shakil,
indeed, the source itself has dimension (K/s), but in the syntax of expressionSource, it is given separately: expression "543"; dimensions [0 0 -1 1 0 0 0]; My problem works fine with this constant source, but if I try to use a function expression "54*(T-473.15)" I got an error message that expression cannot be evaluated, because T and "473.15" do not have the same dimension. Now, I do not know how to define this constant with a dimension in this HeatSourceDict. Best, Lilla |
Quote:
In the meantime a feasible workaround should be: - create an expression field TDiff with value "T-473.15" - rewrite your expression to "54*TDiff" |
Dear Bernard,
thanks for your reply. I'll do the bug report, of course. Just to be sure that I understood you well. What I did is that - dirty as it may - I defined that variable T-Tref, in my solver and called it expressionSource. In this way I bypassed the problem. That what you have meant, too? In any case, if I submit this report, will I be able to follow the progress of it? At one point I need to go for a newer release of OF - costumer request - and there I'd like to go back to the minimal, clean implementation. All the best and thanks for this great tool, Lilla |
Quote:
Quote:
Quote:
|
Great, thanks!
Lilla |
I'd like to update the previous problem.
In fact, it works fine with: - single phase model, one region - single phase model, multi-region It is not working fine (meaning takes the dimensions) - multiphase model, multi-region I have not tried the multiphase, one region, I'll do so, if I have a bit of time. So I do not know now, if it is really a bug, or rather I have use/implemented it wrongly? Best, Lilla |
All times are GMT -4. The time now is 06:53. |