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

CellZones to solve different eq in different zones

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

Like Tree1Likes
  • 1 Post By Anne Lincke

Reply
 
LinkBack Thread Tools Display Modes
Old   October 15, 2008, 13:36
Default Hi forum! I'm trying to solve
  #1
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 9
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
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 ;-))
ivan_cozza is offline   Reply With Quote

Old   October 16, 2008, 02:51
Default Take a look at the rhoPorousSi
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Take a look at the rhoPorousSimpleFoam solver and the porousZone, porousZones classes. This approach might be applicable for your case too.
olesen is offline   Reply With Quote

Old   October 16, 2008, 11:57
Default I've taken a look in rhoPorous
  #3
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 9
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
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 non-refletting 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
ivan_cozza is offline   Reply With Quote

Old   October 20, 2008, 21:55
Default 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: 11
7islands is on a distinguished road
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
7islands is offline   Reply With Quote

Old   October 21, 2008, 03:17
Default Hi Takuya! Non reflective b.c
  #5
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 9
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
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 nr-bc.
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 far-field, 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, 455-480.
ivan_cozza is offline   Reply With Quote

Old   October 21, 2008, 05:01
Default 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: 11
7islands is on a distinguished road
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
7islands is offline   Reply With Quote

Old   October 21, 2008, 10:56
Default Takuya, I think you're in the
  #7
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 9
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Takuya,
I think you're in the correct direction.
If you have any idea on the multi-zone approach for PML in OpenFOAM, let's discuss togheter, we will find out some solution!
ivan_cozza is offline   Reply With Quote

Old   June 30, 2011, 10:53
Default
  #8
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 152
Rep Power: 6
Anne Lincke is on a distinguished road
Quote:
Originally Posted by ivan_cozza View Post
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 non-refletting 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
Dear Ivan,

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
Amir likes this.
Anne Lincke 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
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


All times are GMT -4. The time now is 16:22.