Defining convergent center-oriented gravity field! please Help me
Hi everybody,
any one know how can I define a convergent (center-oriented) gravity field in OF? I have a sphere that have a convergent gravity field. Thank you |
what is "convergent gravity field"?
|
1 Attachment(s)
Quote:
Assume we want to solve convection heat transfer in a spherical body that it has a gravity field. for example the earth, the earth gravity vectors are perpendicular to the surface and they are intersecting each other at the center of sphere(earth- a center-oriented field). Do you know how can I define such gravity field that varies with radius of sphere? Thank you |
it is possible with some pieces of coding:
i have an idea, instead of using a dimensionVector "g" , define a VolVectorField "g" then, using funkySetField or setField utility to define a non-uniform "g" |
Quote:
I will test it. |
Dear adam
it seems that your field is constant over time. the simplest way is to look how the points are written in constant/points. then write a code with a programming language to create a non uniform distribution. |
Quote:
just now I'm trying!!!!!!!! thank you |
Quote:
I try but I couldn't do it, I never did it before and I'm pretty a new user of OF. can you give me more information about defining this field or an example? thank you |
Dear mahmoud
do you use blockmesh. if yes, send me your case to describe you |
Quote:
No, I create it with Gambit (.msh) and I've used fluent3DMeshToFoam. have you any idea??? Thank you Mostafa Mahmoudi |
if you can please show it in the site for better understanding
|
1 Attachment(s)
Quote:
it is similar to the earth, it has a hot core and its surface is at ambient temperature. assume that the mantle of earth is a fluid. I want to solve the convection in mantle. Thank you niaz Mostafa Mahmoudi |
Dear adam
if you set your center to (0 0 0) you can use your point for creating the fields. you should define a vector field then use your points to calculate the vector. gfield=g*(x/R*i+y/R*j+z/R*k) R=(x2+y2+z2)^1/2 |
Quote:
Where should I define this field? I never do anything such it before. do I apply it to g file in constant directory? please explain it for me with more details. how can I calculating the vector by using points? at least I have 1 million points. a new problem is that my gravity is varying with depth!!!! it means that the gravity at 0.5R isn't equal to gravity at R!!!! What should I do???? again thank you niaz |
Greetings to all!
This isn't the first time I see someone asking about changing how gravity works in OpenFOAM. But after a quick search, I only found this to be relevant: http://www.cfd-online.com/Forums/ope...tml#post360969 post #23 That particular post has an implementation that might be a good source of information or at least idea on how to do what you're looking for. Good luck! Bruno |
Quote:
that was great, I got many ideas from it! all of posts were about time dependence of gravity, but my problem is varying it with depth. it is independent of time. how can I apply it? of course, after defining my gravity pattern!!!! because I have problems in defining a center-oriented gravity field yet! |
Dear adam
please look at your points in constant folder. your points are written in the form of (x y z). you need to drive a unit vector which I discuss in last post. |
Quote:
this is a portion of points file: Code:
/*--------------------------------*- C++ -*----------------------------------*\ thank you |
hi dear adam
as my friend niaz told you before, you need a unit vector. unit vector can be find like that: (r-r0)/|r-r0| which r is the position vector in each point and r0 is the position vector of your center, as i before said i guess you should define a volVectorField instead of dimensionedVector (Burno post give you the idea how to implement it), then you can define easily such a function with funkySetFields or groovyBC |
Quote:
I hope that I can do it. I will be here soon!!!!! ;) |
All times are GMT -4. The time now is 00:01. |