Generating nonuniform meshes with sizefunction
Is it possible to generate non-uniform grids with nodes positioned following a distribution expressed by an analitical function?
Regards, Alberto |
Yes. Generate a uniform mesh
Yes. Generate a uniform mesh and then move the points :-)
Hrv |
Yes. Generate a uniform mesh
Yes. Generate a uniform mesh and then move the points :-)
Hrv |
Do you mean with the moveMesh
Do you mean with the moveMesh solver?
I gave a look, but it doesn't seem I can use a user defined function but only linear, quadratic and exponential (I need an hyperbolic tangent). Alberto |
How about just doing a little
How about just doing a little custom code like this:
pointField newPoints = mesh.points(); forAll (newPoints, i) { // Your code here, calculate the point position } mesh.movePoints(newPoints); mesh.write(); Hrv |
Thanks Hrv. It works! :-)
Thanks Hrv. It works! :-)
|
Hi Alberto,
Could you possi
Hi Alberto,
Could you possibly give an example of how to move the internal points of a uniform mesh? (Just the few lines within the forAll(newPoints,i){} ) Thanks, Frank |
Check your mail :-)
A.
Check your mail :-)
A. |
Hi
I want to solve channel f
Hi
I want to solve channel flow with hyperbolic mesh in one direction. i am new in O-F, how can i generate hyperbolic mesh in O-F? Regards Thanks for your help |
Hello Ehsan,
the trick is exa
Hello Ehsan,
the trick is exactly the one explained by Hrvoje in this thread. Create a uniform mesh, with the number of nodes you need in the three directions. Then write a small utility which: - Reads the mesh (see how this is done in all solvers or mesh manipulation utilities). - Does pointField newPoints = mesh.points(); forAll (newPoints, i) { // Your code here, calculate the point position } mesh.movePoints(newPoints); mesh.write(); using an analytical expression to relate the position of a node in a uniform grid to the new position (this is commonly done to generate grids for channel flow simulations). Regards, Alberto |
Hello Alberto
Thank you very
Hello Alberto
Thank you very much for your guide. Could you possibly give your code? And tell me where should I add this code? Excuse me for my basic question because I am new in O_F. Best regards |
hello Alberto
Thank you very
hello Alberto
Thank you very much for your help,it works well. Best Regards. |
You're welcome :-)
Happy ne
You're welcome :-)
Happy new year, Alberto |
Happw new year Alberto
I am
Happw new year Alberto
I am going to run a channel395 with channel oodles solver, when i choose mixedsmagorinskey model and laplace filter, after some iteration, courant number diverged. but when i used simple filter it works,and also when i changed the mesh into uniform mesh, it works. Do you have any idea about this problem? Best Regards. |
Hello Alberto,
Thanks for y
Hello Alberto,
Thanks for your hyperbolicSpacingChannel code. It works well with the given channel395 case. Thanks. |
Hi, I would like to output the polyMesh in a new time directory. I tried to add
Code:
runTime++; Code:
Requested field U does not exist in the database |
To be more accurate, here is my new code
Code:
#include "argList.H" |
Dear John,
this error is not at all obvious ;-) My bet is that you have a functionObject (fieldAverage to be precise) which I asking for U, but cannot find it. Comment it and all will be fine - I hope :o Henrik |
I think one day I saw a piece of code which deactivated functionObjects, but I can not find it again. Do you see what I am refering to ?
-EDIT- Just found it, it seems to be the Code:
functionObjectlist::off() |
Dear John,
the keyword is "active_" ... $FOAM_SRC/postProcessing/forces/lnInclude/forces.H Henrik |
All times are GMT -4. The time now is 07:57. |