CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

time derivative of laplacian

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 2, 2020, 05:46
Default time derivative of laplacian
  #1
New Member
 
Max
Join Date: Jan 2017
Posts: 9
Rep Power: 9
nikitin-pro is on a distinguished road
I have a function I can't implement:
\frac{\partial(c\alpha\Delta T)}{\partial t}

a -- is a constant in [m2/s], which I defined via external dictionary (lookup)
c -- is a constant in [s], which I defined via external dictionary (lookup)
T -- is temperature in [K]

Laplacian of T should yield [K/m2] and c\alpha\Delta T should yield [K], which is a scalar field. I can't understand why I can't get a time derivative from it.

I've tried
fvm::ddt(c * fvm::laplacian(a,T)), but got an error: no matching function for call to ‘Foam::GeometricField::GeometricField(Foam::tmp >)’
nikitin-pro is offline   Reply With Quote

Old   August 2, 2020, 17:06
Default
  #2
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
Quote:
Originally Posted by nikitin-pro View Post
I have a function I can't implement:
\frac{\partial(c\alpha\Delta T)}{\partial t}

a -- is a constant in [m2/s], which I defined via external dictionary (lookup)
c -- is a constant in [s], which I defined via external dictionary (lookup)
T -- is temperature in [K]

Laplacian of T should yield [K/m2] and c\alpha\Delta T should yield [K], which is a scalar field. I can't understand why I can't get a time derivative from it.

I've tried
fvm::ddt(c * fvm::laplacian(a,T)), but got an error: no matching function for call to ‘Foam::GeometricField::GeometricField(Foam::tmp >)’
Assuming that your interpretation of the term you show is correct, which i think is not, you're trying to project in time a linear system of equations (laplacian). In other words, a linear system of a linear system... What you want is:

fvm::ddt(fvc::laplacian(...

Coming to your interpretation problem, you are mixing mathematical notations. The leibniz notation (d/dt) with the vector (nabla, delta) notation for derivatives. Im betting the Delta T in the term above means "temperature difference", not "second order derivative of..."'
Santiago is offline   Reply With Quote

Old   August 2, 2020, 17:22
Default
  #3
New Member
 
Max
Join Date: Jan 2017
Posts: 9
Rep Power: 9
nikitin-pro is on a distinguished road
Interesting thing:compiles OK:
volScalarField lap(c * fvc::laplacian(a,T));
fvScalarMatrix TEqn (fvm::ddt(T) - fvm::ddt(lap) - fvm::laplacian(a,T) == 0);
but solution fails with the following error:
incompatible fields for operation
[T] - [(c*laplacian(a,T))]



compilation error (no matching function for call to ‘ddt(Foam::tmp >)’):
fvScalarMatrix TEqn (fvm::ddt(T) - fvm::ddt(c * fvc::laplacian(a,T))) - fvm::laplacian(a,T) == 0);

-----------------------------------
As for notation: This is a part of modified Fourier equation:
\frac{\partial}{\partial t}(T-ca\Delta T) = a\Delta T
where a -- thermal diffusivity [m2/s]


if one set c=0 s, then will get simple heat equation
nikitin-pro is offline   Reply With Quote

Old   August 3, 2020, 16:21
Default
  #4
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
did you try:


fvc::ddt(c * fvc::laplacian(a,T)))


I think there is no implicit operator implement in openfaom for what you want to do
mAlletto is offline   Reply With Quote

Old   August 3, 2020, 16:35
Default
  #5
New Member
 
Max
Join Date: Jan 2017
Posts: 9
Rep Power: 9
nikitin-pro is on a distinguished road
I did.. same error.
a somewhat solution is that
c * fvc::laplacian(a,fvc::ddt(T)) or c * fvc::ddt(volScalarField("lap",fvc::laplacian(a,T)) )


Both compile ok and simulation runs well, but this term doesn't affect solution at all. Seems like ca\Delta\frac{\partial T}{\partial t}=0

Last edited by nikitin-pro; August 3, 2020 at 18:07.
nikitin-pro is offline   Reply With Quote

Reply

Tags
laplacian operator, openfoam, time derivative


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 6, 2023 00:48
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 03:20
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 08:47
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 10:34


All times are GMT -4. The time now is 19:36.