Hi forum!
I'm trying to solve
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 ;)) 
Take a look at the rhoPorousSi
Take a look at the rhoPorousSimpleFoam solver and the porousZone, porousZones classes. This approach might be applicable for your case too.

I've taken a look in rhoPorous
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 
Hi Ivan,
As I will be startin
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 
Hi Takuya!
Non reflective b.c
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. 
Hi Ivan,
Thanks a lot for t
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 
Takuya,
I think you're in the
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! 
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 :) 
All times are GMT 4. The time now is 00:44. 