
[Sponsors] 
October 15, 2008, 13:36 
Hi forum!
I'm trying to solve

#1 
Senior Member

Hi forum!
I'm trying to solve two different PDE in two zones of my mesh. To be precise, in one zone I have some extra terms that aren't present in the other. I take a look around and it seems that I can do something with cellZones, but, how can I code " if this zone is A then ddt + dudx = something else ddt + dudx +dadx = something else" ? I've allready looked at the various threads on conjugate heat transfer, but it seems that is not my case, because I don't whanto to have patches in betweem of the two zones, I want to solve it continuously, just adding extra terms in some zone. Have a nice day (or night, depending on your country ;)) 

October 16, 2008, 02:51 
Take a look at the rhoPorousSi

#2 
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 801
Rep Power: 21 
Take a look at the rhoPorousSimpleFoam solver and the porousZone, porousZones classes. This approach might be applicable for your case too.


October 16, 2008, 11:57 
I've taken a look in rhoPorous

#3 
Senior Member

I've taken a look in rhoPorousSimpleFoam solver and porousZone class, but it seems not to be usefull for me, as these codes work only on fvMatrices, cycling on the zoneCells and for each cell put in the fvMatrix the extra pieces.
In my problem I'm obliged to work with full explicit RK time integration, so I only do fvc::stuff and put it as Right Hand Side in RK. I can't do a cycle on the cell of a zone, I need something that says: "if you're in the A zone use this eq. else use this different one". The stuff made in cht seems similiar, but my problem is that I want to avoid internal patches, I want to solve in a continuous way both the equations, without imposing internal bc (I'm trying to write a particular type of nonrefletting bc based on sponge zones, if I put internal patches I will have internal reflections, so no good!). Now I will try to solve a sum of the two equations in the whole domain, and multiplying the extra terms by a switch that's zero where I want these to disappear, but I know that this is not efficient, as I need the extra terms in a small part of the domain. Cheers, Ivan 

October 20, 2008, 21:55 
Hi Ivan,
As I will be startin

#4 
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 13 
Hi Ivan,
As I will be starting next month some works on solving exterior problems with LEE I'm very much interested in your approaches. So far I am looking for literature about non reflective b.c. but I still can't determine which technique is best suited to be implemented in OF. Do you have any interesting literature about it, or any comments? Thanks, Takuya 

October 21, 2008, 03:17 
Hi Takuya!
Non reflective b.c

#5 
Senior Member

Hi Takuya!
Non reflective b.c. for aeroacoustics is just a question of philosophy! If you talk with 10 aeroacousticians, they will tell you 10 different things! So, in my opinion, and as resulted from some numerical test we did in my group (with fortran codes), PML is now the best working nrbc. I've implemented the Unsplit Stable PML of Hu, it's easy to find it on the web. Now it works only for uniform mean flow, but it exists a formulation for general mean flow. Moreover, I suppose that PML are the easyest bc that you can implement in OF, as they are NOT bc's! You just solve a different PDF with some absorbing terms in a sponge zone around your farfield, and at the real boundary you put fixed value 0 or zeroGradient according to th characteristic analysis, and that's all! Now the problem for me is that I'm obliged to solve the PML PDF everywhere and put it to zero in the interior domain with a zone switch, so it's very heavy! Next step will be: it's possible to set different PDF in different zones (using for example splitMeshRegin) but do it without putting a patch between the two domains? I would like to do the same as the code do in parallelization, I can accept something like a processor bc between the two domains, not anything physical!! P.S. the reference is: Hu, F. Q., 2001:A stable, perfectly matched layer for linearized Euler equations in unsplit physical variables.J. Comput. Phys., 173, 455480. 

October 21, 2008, 05:01 
Hi Ivan,
Thanks a lot for t

#6 
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 13 
Hi Ivan,
Thanks a lot for the reference! I had a quick look at the one and indeed looks quite doable. I already have found the general mean flow version (Hu 2005, J. Comput. Phys., 469) but had not found the 2001 one which looks better to start with. As I just have started digging with nonreflective bcs I'm a lot relieved to find at least I'm not in a totally wrong direction. Takuya 

October 21, 2008, 10:56 
Takuya,
I think you're in the

#7 
Senior Member

Takuya,
I think you're in the correct direction. If you have any idea on the multizone approach for PML in OpenFOAM, let's discuss togheter, we will find out some solution! 

June 30, 2011, 10:53 

#8  
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 9 
Quote:
I have to solve a similar problem, i.e. on a certain cellZone I have to solve an equation which includes an additional term. I solved the problem by creating a volScalarField which is "zero" on cellZone A and "1" on cellZone B. With setFields I can initialize the scalar properly. In the solver I add the additional term and multiply it with the scalar. The result is that the additional term is only added on the cellZone B where the scalar is "1". What do you think? Have you solved your problem yet? I know it is quite a long time ago since you posted but maybe you are interested anyway 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Definition of cellZones  sradl  OpenFOAM Mesh Utilities  2  September 13, 2007 10:27 
FluentMeshToFoam writes too small cellZones  gschaider  OpenFOAM Bugs  0  May 22, 2007 13:57 
What are Zones used for  tj22  OpenFOAM Paraview & paraFoam  8  September 5, 2006 05:21 
can I use layering in only any zones?  Rafael  FLUENT  0  June 7, 2005 08:22 
help with grid zones  csertoi_aurel  FLUENT  0  February 4, 2005 13:46 