|
[Sponsors] |
Any possibility to calculate grad*grad implicitly? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 16, 2017, 13:23 |
Any possibility to calculate grad*grad implicitly?
|
#1 |
Member
Join Date: Jun 2016
Posts: 99
Rep Power: 9 |
Hello all,
I have a mass transport equation with term CodeCogsEqn.png where c is unknown concentration to be solved and T is known temperature from previous equation. I transformed the above term into CodeCogsEqn (2).png And since term grad(T) is dominating, I want to solve grad(C) implicitly. However there's only fvc::grad(C) to use. So is there any possibility to solve this term implicitly? Thanks. |
|
May 16, 2017, 18:22 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
No, the gradient can only be calculated with the last stored values. I never heard that people calculate the gradient implicitly. Now I am wondering, if it would be possible in general. Well. In FOAM it is not possible. See page 35: http://foam.sourceforge.net/docs/Gui...mmersGuide.pdf
__________________
Keep foaming, Tobias Holzmann |
|
May 16, 2017, 19:43 |
|
#3 |
Member
Join Date: Jun 2016
Posts: 99
Rep Power: 9 |
Actually I don't need an implicit gradient. All I need is an implicit inner product of two gradients, which is a scalar.
Or, can I discretize the original term directly? |
|
May 17, 2017, 02:19 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi, the First Term is a laplacian which can be treated implicitly.
Sent from my HTC One mini using CFD Online Forum mobile app
__________________
Keep foaming, Tobias Holzmann |
|
May 17, 2017, 09:08 |
|
#5 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
I was talking to my colleague Chris about that and I am sorry to get the message wrong. You are solving for c which I was not aware yesterday. So what you could try is: a) Solve TEqn. b) Build you gradT = fvc::grad(T) field c) Solve your equation and treat your divergence term implicitly like: which would be: Code:
fvm::div(gradT, c)
__________________
Keep foaming, Tobias Holzmann |
|
May 17, 2017, 09:27 |
|
#6 |
Member
Join Date: Jun 2016
Posts: 99
Rep Power: 9 |
No, this won't work.
It says: Code:
cannot convert ‘gradT’ (type ‘Foam::volVectorField {aka Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>}’) to type ‘const surfaceScalarField& {aka const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&}’ |
|
May 17, 2017, 09:46 |
|
#7 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Ah, of course. I am sorry again. So you have to interpolate the gradient to the surface first. Thus you have to do the following:
a) create a new surfaceScalarField b) Interpolate the gradT to the surfaces c) use this field in the divergence term Like: Code:
volScalarField gradT = fvc::grad(T); surfaceScalarField gradTf = fvc::interpolate(gradT) & mesh.Sf(); fvm::div(gradTf, c)
__________________
Keep foaming, Tobias Holzmann |
|
May 17, 2017, 10:45 |
|
#8 |
Member
Join Date: Jun 2016
Posts: 99
Rep Power: 9 |
Yeah I can compile it. I can't wait to see the result of a testing case.
So is it something like a heat flux without thermal conductivity? |
|
May 18, 2017, 07:40 |
|
#9 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Yes, the physical meaning of the divergence is the flux which is going in and out of an volume element. I have no idea how you got to that term because it would mean that the concentration (of some species?), is transported by the temperature gradient (like a temperature flux). Thus, the concentration is moving to the highest temperature (if I have the sign correct - or vice versa). However, normally only the velocity can transport a quantity by fluxes. But maybe there is some physical meaning behind your term that I don't know. In the general conservation equations, I never saw a term like that.
But nice to hear, that it is working.
__________________
Keep foaming, Tobias Holzmann |
|
May 18, 2017, 08:25 |
|
#10 |
Member
Join Date: Jun 2016
Posts: 99
Rep Power: 9 |
It's called thermophoresis. Particles can be driven by temperature gradient.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculate CF | Odusseas | Tecplot | 3 | August 28, 2020 14:16 |
calculate friction factor & nusselt number | soheil1991 | FLUENT | 3 | March 11, 2017 09:30 |
How to calculate Torque for francis turbine | manish | CFX | 4 | March 15, 2007 02:57 |
The terms that should be treated implicitly in LES | ben | Main CFD Forum | 3 | January 28, 2005 03:32 |
How to calculate density of solid phase | zhou | Main CFD Forum | 0 | December 17, 1999 19:06 |