CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Question about layer additionremove (https://www.cfd-online.com/Forums/openfoam-solving/60320-question-about-layer-additionremove.html)

liu February 20, 2006 17:19

When a layer of cells are adde
 
When a layer of cells are added to the domain, how are the variables (such as velocity, pressure) defined? Are they just the copy from the master cells?

liu February 20, 2006 17:27

Sorry, I got another related q
 
Sorry, I got another related question.
How about the values on the newly added faces? Are they evaluated immediately after they are added to the domain? Or should we force that process somewhere.

I got some discontinuity when I tried to solve scalar transport equation after a layer of cells are added.
Here is a picture. A object is moving on the floor. The scalar field is not so smooth.
http://www.cfd-online.com/OpenFOAM_D...ges/1/1839.jpg

hjasak February 20, 2006 19:10

Hi Xiaofeng, You need to be
 
Hi Xiaofeng,

You need to be a bit careful about this. There's something clearly wrong with the solution, but you may be looking at the wrong place.

For starters, for all points/faces/cells that are added to the geometry, there is a "parent" object, i.e. you can add a cell (say) from a parent point, a parent face etc. When the interpolation is done, the initial value in the new cell will be interpolated from the values around the parent. Thus, in cases where a cell is inserted off a point, all old cell values around the point are used for interpolation. In layer addition, cells are added off master faces; when the master face is internal, the old-time value is obtained by interpolation from old cells around it.

However, in reality, the old-time values for the added cells do not get used at all. This is because the cells are added in such a way that the "old-time" volume is zero and this multiplies the old-time value, giving zero. The actual work is done by the mesh motion algorithm, where the motion flux (volume swept by the face in motion) deals with the change in volume. Therefore, the new solution "mapping" (there's no mapping, really) will actually be obtained by the mesh motion algorithm.

It seems to me you've got a problem with the old-time and new-time volume and motion fluxes - please check in the scalar transport equation.

Enjoy,

Hrv

liu February 21, 2006 15:46

I tried again. Bad thing happ
 
I tried again.
Bad thing happened just after the topological change. Here is the pictures.
Before the topological change. The object on the floor moved to the left for several steps and everything seems fine.
http://www.cfd-online.com/OpenFOAM_D...ges/1/1844.jpg

But when the topological change happens, it seems the flux are not valid for the newly added faces.
http://www.cfd-online.com/OpenFOAM_D...ges/1/1845.jpg

liu February 21, 2006 16:07

Another find. If I don't so
 
Another find.

If I don't solve the scalar transport equation at the topological change step, every thing seems ok. I believe that flux information is not right at the topological change step for scalar transport. After that step, fluid flow evolved and these flux are constructed right.

hjasak February 21, 2006 16:18

That makes sense: you did not
 
That makes sense: you did not re-calculate the fluxes, right? I don't know which solver you have built this into, but the flux field at the point where you form the scalar transport equation is wrong/not up to date.

You will need to study and understand the top-level solver to find out where to insert the additional transport equation becaus enow it's in the wrong place.

Hrv

liu February 21, 2006 16:26

No, I didn't instruct the code
 
No, I didn't instruct the code to re-calculate the fluxes.
The code I am modifying is settlingFoam. I want to model the effect of moving object on the sedimentation process.
The basic steps are following:
1. moveAndMorph() the mesh
2. solve alpha scalar transport equation (pictures shown above)
3. solve the flow field (PISO loop).

NOW I know why the flux is not right. That's because I solved scalar transport equation BEFORE the PISO loop. I will try it again.

Thanks Hrv.


All times are GMT -4. The time now is 12:38.