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

Morphology Divergence of a boundary patch field

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2014, 10:27
Talking
  #21
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by Fanfei View Post
Hei Niels
I have used FAM to solve Exner equation. while the program run, there is a problem. It need creat famesh in constant file, but I couldn't find examples of FAM in of-3.1-extend, so i didn't kow how to do that. Could you give me some hints about how to creat a famesh.

Best regards
Fan Fei
hi all
I have found the example of Fam. They are in surfaceTracking file on tutorials.
Best regards
Fan fei
Fanfei is offline   Reply With Quote

Old   March 27, 2015, 07:15
Default 3D sand slide model
  #22
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Hi All:
Recently, I did some work on sand slide model. And I have understood the 2D sand slide model. But, i still confused how to work with 3D sand slide model. someone can give me some hints, any hints are welcome.
Best Regards!
Fan Fei
Fanfei is offline   Reply With Quote

Old   March 27, 2015, 08:33
Default
  #23
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hallo Fan Fei,

I have recently had an article accepted, where I describe a 3D geometrical sand sliding routine:

http://onlinelibrary.wiley.com/doi/1....4015/abstract

Note that this article is also highly relevant with respect to the mass conservation of the sediment due to face-to-vertex interpolation of the rate of bed level change. The native method in OpenFoam (primitivePatchInterpolation with the faceToPoint method) is shown not to be mass conserving.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   April 28, 2015, 09:17
Default
  #24
New Member
 
Lu ZHOU
Join Date: Jul 2014
Location: Lyon, France
Posts: 12
Rep Power: 12
lzhou is on a distinguished road
Hello Niels,

Sorry to bother you but I am also trying to solve the Exner equation using FAM. I would like to ask is there a difference between directly using the fac::div() function and calculating linearEdgeInterpolate(qB) & aMesh.Le() as you mentioned in your posts ?

Also, when I am calculating the divergence on finite area mesh, I've got a problem related to boundary value which I explained here:http://www.cfd-online.com/Forums/ope...area-mesh.html

I think it is because I use Qsa.internalField()=vsm.mapToSurface(Qs.boundaryFi eld()) so only the internal field of Qs is mapped but not the boundary values. Is there a function like .correctBoundaryCondition() existed in finite area mesh ? Thank you in advance for any help !

Best regards !

Lu
lzhou is offline   Reply With Quote

Old   April 28, 2015, 16:54
Default
  #25
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hallo Lu,

I have never seen that type of problem (with non-periodic domains), and fac::div does obey to a zero gradient. I have very recently used a zero gradient on a bed load field and it worked perfectly.

The problem might be related to the mapping, and I have never used the mapping, i.e. I keep all fields on the boundary (in fa-fields).

With respect to the difference between fac::div and the dot-product approach, then I would suggest that you look into the article I sighted above, because both the usage of the fac:div approach and the dot-product contains vertical contributions, which even at the continuous level of the Exner equation can lead to instabilities.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   May 21, 2015, 23:16
Default
  #26
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hallo Fan Fei,

I have recently had an article accepted, where I describe a 3D geometrical sand sliding routine:

http://onlinelibrary.wiley.com/doi/1....4015/abstract

Note that this article is also highly relevant with respect to the mass conservation of the sediment due to face-to-vertex interpolation of the rate of bed level change. The native method in OpenFoam (primitivePatchInterpolation with the faceToPoint method) is shown not to be mass conserving.

Kind regards,

Niels

Hi Niels:
I'm so sorry to trouble you. I have study your papar about the mass conservation of interpolated. you did a good job. However, I still have problem understanding the 3D sand slide model. From my unstanding, after the mesh update, the steepest slope of each face are calculated. if the slope exceed the slope of repose, the face cell will need to adjust. And the face will rotated around the face centre for mass conservation, and new location of points of that face will be computed. and then the mesh update, is that right?
Greeting !
Fan Fei
Fanfei is offline   Reply With Quote

Old   May 22, 2015, 02:26
Default
  #27
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hallo Fan Fei,

Thank you.

Yes, that is the overall methodology, but you do not need to move the mesh before the sand slide. You could simply use the information from the Exner equation (and prober interpolation) to evaluate the correction due to sand sliding.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   May 22, 2015, 03:21
Default
  #28
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hallo Fan Fei,

Thank you.

Yes, that is the overall methodology, but you do not need to move the mesh before the sand slide. You could simply use the information from the Exner equation (and prober interpolation) to evaluate the correction due to sand sliding.

Kind regards,

Niels
Hi Niels:
Thank you for your reply. But I'm more confuse now. Do you mean that as the exner equation solve, the correceted of sand slide should be computed at the same time. In other words, before the points of mesh move, a limiter is constructed to limited the moving of points. is that right?
Best regards
Fan Fei
Fanfei is offline   Reply With Quote

Old   May 22, 2015, 03:57
Default
  #29
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Yes, you can consider the sand sliding as a limiter.

(i) Solve the Exner equation, (ii) interpolation to the vertices, (iii) perform sand sliding on the new (but not moved points) and (iv) then update the mesh.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   May 22, 2015, 06:14
Default
  #30
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by ngj View Post
Yes, you can consider the sand sliding as a limiter.

(i) Solve the Exner equation, (ii) interpolation to the vertices, (iii) perform sand sliding on the new (but not moved points) and (iv) then update the mesh.

Kind regards

Niels
Hi Niels:
Thank you very mech. I'm clear now. However, I have a detials question on perform sand sliding. if i want to limitied the movement of vertices, some variables need: (1)the steepse angle of that face cell (2)the coordinate of face center (3) the coordinate of vertices of that face. Now I have trouble on access the coordinate of vertices of The assigned face. for example i want to get the coordinate of vertices of U.boundaryField()[patchID][i]. is there a function can do that? Thanks.
kind regards
Fan Fei
Fanfei is offline   Reply With Quote

Old   May 22, 2015, 11:53
Default
  #31
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Fan Fei,

What you want to achieve is all available through the mesh-connectivity information, e.g.

Code:
mesh.faceCells();
mesh.facePoints();
// ... etc
But it requires some working to gather all the information; this is an additional advantage of using the faMesh, because you have simpler connectivity on the bed, because the mesh is only the bed.

Please note that the dualMesh interpolation approach, which I have suggested in my paper, is not available in OpenFoam, so you will need to construct that yourself.

With respect to the steepest slope, then it is a simple vectorial derivation, where you merely need the normal vector to the face and the direction of gravity. I will leave it to you to do the derivation.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   May 22, 2015, 20:38
Default
  #32
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Fan Fei,

What you want to achieve is all available through the mesh-connectivity information, e.g.

Code:
mesh.faceCells();
mesh.facePoints();
// ... etc
But it requires some working to gather all the information; this is an additional advantage of using the faMesh, because you have simpler connectivity on the bed, because the mesh is only the bed.

Please note that the dualMesh interpolation approach, which I have suggested in my paper, is not available in OpenFoam, so you will need to construct that yourself.

With respect to the steepest slope, then it is a simple vectorial derivation, where you merely need the normal vector to the face and the direction of gravity. I will leave it to you to do the derivation.

Kind regards,

Niels
Hi Niels:
Thank you very much for your reply.
I solve Exner and get the movement of face centre with FAM method, then mapped the value to FVM and then interpolated from face centre to vertices with FVM mesh. I test my model with local Scour dut to jet, it can work 5 min. however, when the slope exceed the repose, the critical shields be negative, and the program break down, so i decide to add sand slide model to it. You give me a lot of help for sand slide. Thank you very much. I'll try your method. if it works, i'll be let you know. Thanks.
Best regards,
Fan Fei
Fanfei is offline   Reply With Quote

Old   May 23, 2015, 07:28
Default
  #33
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Fan Fei,

Yes, you will need a sand sliding module for most problems (especially scour). Your procedure sounds good, but I do not see, why you need to make the mapping between faMesh and fvMesh for the mesh motion. You should be able to perform all of these operations on the faMesh and only communicate directly to the mesh motion solver; through the setting of boundary conditions of the relevant fields, e.g. pointDisplacement, motionU, etc.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   May 24, 2015, 05:25
Default
  #34
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Fan Fei,

Yes, you will need a sand sliding module for most problems (especially scour). Your procedure sounds good, but I do not see, why you need to make the mapping between faMesh and fvMesh for the mesh motion. You should be able to perform all of these operations on the faMesh and only communicate directly to the mesh motion solver; through the setting of boundary conditions of the relevant fields, e.g. pointDisplacement, motionU, etc.

Kind regards,

Niels
Hi Niels:
I used mesh.Cf.boundaryField()[patchID][i] to access coordinate of the face centre of bed, as i access the points of face cell with mesh.facePoints().boundaryField()[patchID][i], some errors are occured. The error show that mesh has no member facePoints(). Is there something wrong with my openfoam version. my openfoam version is openfoam-extend 3.1.
Kind regards
Fan Fei
Fanfei is offline   Reply With Quote

Old   May 24, 2015, 09:27
Default
  #35
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Fan Fei,

Yes, you will need a sand sliding module for most problems (especially scour). Your procedure sounds good, but I do not see, why you need to make the mapping between faMesh and fvMesh for the mesh motion. You should be able to perform all of these operations on the faMesh and only communicate directly to the mesh motion solver; through the setting of boundary conditions of the relevant fields, e.g. pointDisplacement, motionU, etc.

Kind regards,

Niels
Hi Niels
I'm so sorry to trouble you. I find a function can access the points of assign face, it's localPoints(), i can use mesh.boundaryMesh[patchID].localPoints to access the the coordinate of points of assign faces. However, when i use for loop to access the assign face cell. some error occured.
*********************code************************* ************
for(int ii=0; ii<mesh.boundaryMesh[patchID].size();ii++)
int bb=sizeof(mesh.boundaryMesh[patchID][ii].localPoints);
************************************************** ********
the error is Error:'const class Foam::face' has no member named 'localPoints'. How I corrected this error. Thanks

Kind regards
Fan Fei
Fanfei is offline   Reply With Quote

Old   May 26, 2015, 00:16
Default
  #36
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Fan Fei,

What you want to achieve is all available through the mesh-connectivity information, e.g.

Code:
mesh.faceCells();
mesh.facePoints();
// ... etc
But it requires some working to gather all the information; this is an additional advantage of using the faMesh, because you have simpler connectivity on the bed, because the mesh is only the bed.

Please note that the dualMesh interpolation approach, which I have suggested in my paper, is not available in OpenFoam, so you will need to construct that yourself.

With respect to the steepest slope, then it is a simple vectorial derivation, where you merely need the normal vector to the face and the direction of gravity. I will leave it to you to do the derivation.

Kind regards,

Niels
Hi Niels
I have found a function in face.H file can help me access the points of assign face.
**********************code**********************
//- Return the points corresponding to this face
inline pointField points(const pointField& meshPoints) const;
*************************************************
however, when i used mesh.boundaryMesh().[patchWallID].[i].points() to access the points of face[i], an error occured: Error:no matching function for call to "Foam::face:oints() const". I try a lot of methods to correcte it, but I fialed. could you help me to correct this error. Thanks.

Best regards
Fan Fei
Fanfei is offline   Reply With Quote

Old   May 26, 2015, 15:01
Default
  #37
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hallo Fan Fei,

The method requires an input, put you do not pass anything.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   May 26, 2015, 21:56
Default
  #38
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hallo Fan Fei,

The method requires an input, put you do not pass anything.

Kind regards,

Niels
Hi Niels:
Thanks for your kindness. This problem has been solve with labelList and mesh.points() function. As we all know, that a point is shared by several face, as those faces rotated around their centres , this point will get a lot of values, which value should I choose?
Kind regards
Fan Fei
Fanfei is offline   Reply With Quote

Old   May 27, 2015, 01:47
Default
  #39
Member
 
Fei Fan
Join Date: Jul 2013
Location: NanJing, China
Posts: 54
Rep Power: 13
Fanfei is on a distinguished road
Quote:
Originally Posted by ngj View Post
Yes, you can consider the sand sliding as a limiter.

(i) Solve the Exner equation, (ii) interpolation to the vertices, (iii) perform sand sliding on the new (but not moved points) and (iv) then update the mesh.

Kind regards

Niels
Hi Niels:
I think maybe i have misunderstood the sand slide model. Assume that a point shared by for face, and each face will have a value on this point. some of them are positive, some are negative. whether can i chose the maximum negative value and the minimum positive value as the limiter to limited the boundary points move?
Best regards
Fan fei
Fanfei is offline   Reply With Quote

Old   May 27, 2015, 03:32
Default
  #40
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Well, the procedure is to consider one face at the time until you have reached a state, where all faces are less than the sliding angle. Therefore, I do not see any problems in which value to assign to a given point.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Reply


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
Given field does not correspond to patch david OpenFOAM Bugs 2 January 29, 2009 14:24
Gamma field on boundary patch tom OpenFOAM Post-Processing 0 March 23, 2008 07:56
Boundary condition vector field gradient from two sides of patch face quba OpenFOAM 0 December 12, 2007 06:26
Projection of field onto patch tehache OpenFOAM Running, Solving & CFD 0 May 7, 2007 03:24
velocity field divergence? gh FLUENT 0 July 6, 2005 12:10


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