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

Calculation of phi if velocity field is known

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 14, 2006, 17:14
Default Hello, I have a quick quest
  #1
Member
 
Ankur Gupta
Join Date: Mar 2009
Posts: 38
Rep Power: 8
ankgupta8um is on a distinguished road
Hello,

I have a quick question on the calculation of 'phi' -
I am using a modified channelOodles solver. I have two mesh regions in my domain. I am solving for the flow in first mesh region. I want to solve for the transport of a scalar in my second mesh region, where I would like to have the same phi field as that of mesh 1.
Is it okay to just copy the velocity field from region 1 to region 2 (for some reasons I can't copy the phi field directly) and calculate phi2 as follows:
phi2 = (fvc::interpolate(U2) & mesh2.Sf());

Please comment on my approach !!

Thanks!
Regards,
Ankur
ankgupta8um is offline   Reply With Quote

Old   October 15, 2006, 01:47
Default Pretty bad. If you want to se
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,762
Rep Power: 21
hjasak will become famous soon enough
Pretty bad. If you want to see how bad it is, check the mass conservation on your second mesh.

You have to do much better than this, otherwise you will have boundedness problems in the scalar transport.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 15, 2006, 02:11
Default Hello Hrv, Could you please
  #3
Member
 
Ankur Gupta
Join Date: Mar 2009
Posts: 38
Rep Power: 8
ankgupta8um is on a distinguished road
Hello Hrv,

Could you please suggest me something (to copy velocity field from mesh 1 to mesh 2) with which I can get accurate answers while solving for scalar transport ??

Thanks!
Regards,
Ankur
ankgupta8um is offline   Reply With Quote

Old   October 15, 2006, 02:32
Default Yes I can. In order to get co
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,762
Rep Power: 21
hjasak will become famous soon enough
Yes I can. In order to get conservative fluxes you will need to solve the pressure equation again on the new mesh - there is no other way of ensuring mass conservation.

On balance, I would say you are (much) better off solving the scalar transport on the same mesh. However, if you have no choice, have a look at my Thesis and you will find the details. There, I was doing adaptive mesh refinement (in FOAM, of course!) and show how to interpolate the components and solve the pressure equation to get mass conservation.

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 15, 2006, 02:59
Default Hello Hrv, Thanks for the r
  #5
Member
 
Ankur Gupta
Join Date: Mar 2009
Posts: 38
Rep Power: 8
ankgupta8um is on a distinguished road
Hello Hrv,

Thanks for the reply.
Here, I would like to mention something that I think I should have said before.
Mesh 2 in my case is exactly twice of mesh 1 (Mesh 1 is a channel, mesh 2 is also a channel. Length of channel 2 is twice that of channel 1. Consider channel 2 to be of two parts - each part exactly equivalent to channel 1). My streamwise BC is periodic for channel 1, so basically I can just copy the velocity field of channel 1 to the two-parts of channel 2.
So, if I am using the converged velocity field of channel 1 to get phi for channel 2, would I still have some mass conservation issues while solving scalar transport for mesh 2 ??

Regards,
Ankur
ankgupta8um is offline   Reply With Quote

Old   October 15, 2006, 03:46
Default You cannot copy the cell centr
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,762
Rep Power: 21
hjasak will become famous soon enough
You cannot copy the cell centre velocity and interpolate it because you will have a mass conservation error. If the two meshes match exactly, you could find face correspondence between the two meshes (they basically need to be identical) and map that. In all other cases, you need to solve the pressure equation.

In any case, do whatever you think is good, calculate the flux divergence in each cell and compare it with the divergence of fluxes on the first mesh. That will tell you how wel you are doing - if the fluxes are not conservative, you will have trouble with scalar transport.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get Pressure field from velocity field qunwuhe@hotmail.com Main CFD Forum 4 October 14, 2007 07:38
Run UDS with given velocity field! williams FLUENT 2 June 1, 2007 12:34
Electric Field calculation JamesT Phoenics 5 May 31, 2007 04:44
velocity field Faiz Ahmed Main CFD Forum 0 March 5, 2006 11:11
Zero velocity field gianluca FLUENT 0 November 29, 2004 11:10


All times are GMT -4. The time now is 05:00.