|
[Sponsors] |
[swak4Foam] Problem with Transient Heat Source (using swak4Foam expression Source) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 3, 2013, 03:04 |
Problem with Transient Heat Source (using swak4Foam expression Source)
|
#1 |
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15 |
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 |
|
August 3, 2013, 06:40 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
August 3, 2013, 07:41 |
|
#3 |
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15 |
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. |
|
August 22, 2013, 01:59 |
|
#4 |
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15 |
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??? |
|
August 22, 2013, 05:57 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
January 7, 2015, 09:47 |
dimensian problems
|
#6 |
Member
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17 |
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. |
|
January 7, 2015, 10:07 |
|
#7 |
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15 |
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 |
|
January 7, 2015, 10:45 |
|
#8 |
Member
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17 |
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 |
|
January 7, 2015, 16:01 |
|
#9 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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"
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
January 8, 2015, 05:07 |
|
#10 |
Member
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17 |
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 |
|
January 8, 2015, 05:51 |
|
#11 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|||
January 8, 2015, 06:01 |
|
#12 |
Member
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17 |
Great, thanks!
Lilla |
|
January 22, 2015, 05:38 |
|
#13 |
Member
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conjugate heat transfer with heat source: Transient vs steadystate | MBttR | Main CFD Forum | 14 | July 26, 2016 11:01 |
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error | FerdiFuchs | OpenFOAM Community Contributions | 27 | April 16, 2014 16:14 |
[swak4Foam] swak4Foam-groovyBC build problem | zxj160 | OpenFOAM Community Contributions | 18 | July 30, 2013 14:14 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |
heat source problem | John | FLUENT | 1 | April 9, 2003 14:08 |