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

dynamicMeshDict diffusivity

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By dduque

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 3, 2014, 07:27
Default dynamicMeshDict diffusivity
  #1
Member
 
Xiantao Zhang
Join Date: Nov 2014
Posts: 31
Rep Power: 11
zhxter is on a distinguished road
hi, Foamers,

I am now trying to establish a 2D numerical wave tank(NWT) using OpenFOAM.

The left boundary of the rectangular NWT is moving to generate waves. Suppose the name of the patch is set "movingWall", and in the dynamicMeshDict, the contents are as follows,

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh dynamicMotionSolverFvMesh;

motionSolverLibs ("libfvMotionSolvers.so");

solver displacementLaplacian;

displacementLaplacianCoeffs
{
diffusivity inverseDistance 1 (movingWall);
}

My question is : what does the number "1" after the inverseDistance mean?
zhxter is offline   Reply With Quote

Old   October 11, 2019, 05:41
Default
  #2
New Member
 
Daniel Duque
Join Date: Jan 2011
Location: ETSIN, Madrid
Posts: 28
Rep Power: 15
dduque is on a distinguished road
It's just the number of patches that are listed next. I just found out myself...
john myce and Michael@UW like this.
dduque is offline   Reply With Quote

Old   February 14, 2020, 12:25
Default
  #3
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 8
john myce is on a distinguished road
Hi guys,

I am also working on dynamic mesh. Does anyone know the meaning of the coefficient set for the following diffusivity methods:

directional (1 200 0);
exponential 5 inverseDistance (...);
motionDirectional (1 1000 0);

I guess they are related to each coordinate axis but I still don't know the meaning of the number setting up.

Cheers,
john myce is offline   Reply With Quote

Old   February 23, 2020, 13:53
Default
  #4
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 8
john myce is on a distinguished road
I'm coming with some updates:

for the coefficient to provide for the exponential method, it is the exponent of the function to calculate the diffusivity:
Code:
Foam::exponentialDiffusivity::operator()() const
{
    return exp(-alpha_/basicDiffusivityPtr_->operator()());
}
from /src/fvMotionSolver/motionDiffusivity/manipulators/exponential/exponentialDiffusivity.C

For the directional & motiondirectional methods, I still don't know if it is just the distance in each coordinate axis or the mean non-orthogonality (first coefficient) and mean skewness (second).

References :http://www.tfd.chalmers.se/~hani/kur...h_openfoam.pdf page 23 &
http://www.tfd.chalmers.se/~hani/kur...AM-rapport.pdf from page 11 to 14

Cheers,
john myce is offline   Reply With Quote

Old   May 20, 2020, 20:04
Default diffusivity directional
  #5
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by john myce View Post
I'm coming with some updates:

for the coefficient to provide for the exponential method, it is the exponent of the function to calculate the diffusivity:
Code:
Foam::exponentialDiffusivity::operator()() const
{
    return exp(-alpha_/basicDiffusivityPtr_->operator()());
}
from /src/fvMotionSolver/motionDiffusivity/manipulators/exponential/exponentialDiffusivity.C

For the directional & motiondirectional methods, I still don't know if it is just the distance in each coordinate axis or the mean non-orthogonality (first coefficient) and mean skewness (second).

References :http://www.tfd.chalmers.se/~hani/kur...h_openfoam.pdf page 23 &
http://www.tfd.chalmers.se/~hani/kur...AM-rapport.pdf from page 11 to 14

Cheers,
Hi John,
Thank you for sharing! I read the reference at http://www.tfd.chalmers.se/~hani/kur...AM-rapport.pdf. It says "the first number determines the mean cell non-orthogonality; while the second number determines the mean cell skewness."

But I doubt the parameters in directional is a vector to control the diffusivity in 3 directions. As I found the code in directionalDiffusivity.C
Code:
void Foam::directionalDiffusivity::correct()
{
    const surfaceVectorField n(mesh().Sf()/mesh().magSf());
    faceDiffusivity_ == (n & cmptMultiply(diffusivityVector_, n));
}
Can you confirm that?

Thanks!

Michael
Michael@UW is offline   Reply With Quote

Old   May 20, 2020, 20:06
Default
  #6
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by zhxter View Post
hi, Foamers,

I am now trying to establish a 2D numerical wave tank(NWT) using OpenFOAM.

The left boundary of the rectangular NWT is moving to generate waves. Suppose the name of the patch is set "movingWall", and in the dynamicMeshDict, the contents are as follows,

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh dynamicMotionSolverFvMesh;

motionSolverLibs ("libfvMotionSolvers.so");

solver displacementLaplacian;

displacementLaplacianCoeffs
{
diffusivity inverseDistance 1 (movingWall);
}

My question is : what does the number "1" after the inverseDistance mean?
Hi Xintao,
I found the number 1 appears in some tutorials but not in some others. Just wondering if it is optional or not.

Thanks,
Michael
Michael@UW is offline   Reply With Quote

Old   May 21, 2020, 10:52
Default
  #7
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 8
john myce is on a distinguished road
Hi Michael,

I have still a doubt of what we clearly provide as an input for the coefficients.
I tried different values but without any revelation.

Anyway thanks for providing this part of the code.
I have found at this link:
https://www.openfoam.com/documentati...89434350fa0f17

Sf returns cell face area vectors.
magSf returns cell face area magnitudes.
cmptMultiply is scaling two tensors : n which gathers Sf/magSf (cell unit vector) & the one which gathers the user-defined coefficients.

So I definitely think that it does not control the diffusivity in 3 directions but instead (tell me if I am wrong), calculating the diffusivity using the user-defined diffusivity vectors and the unit normal vectors of each face.

Cheers
john myce is offline   Reply With Quote

Old   May 21, 2020, 11:09
Default
  #8
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 8
john myce is on a distinguished road
Quote:
Originally Posted by Michael@UW View Post
Hi Xintao,
I found the number 1 appears in some tutorials but not in some others. Just wondering if it is optional or not.

Thanks,
Michael
Regarding this question, you don't have to provide this coefficient but if you provide it with the wrong number of patches declared, the meshing process will not running.
john myce is offline   Reply With Quote

Reply

Tags
inversedistance


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
Kinematic Diffusivity - Problem with additional variable clau90 CFX 3 May 14, 2014 10:54
Diffusivity model in dynamicMeshDict of movingCone xuezhj OpenFOAM Running, Solving & CFD 0 October 2, 2012 23:11
PEM modeling UDS diffusivity in mixture gemini FLUENT 6 August 7, 2012 08:37
What is UDS diffusivity of a self-defined material? aleisia FLUENT 0 March 5, 2011 23:08
Motion diffusivity solver has problems with patches moving toward each other bfa OpenFOAM Running, Solving & CFD 2 July 8, 2009 22:35


All times are GMT -4. The time now is 06:01.