CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

Same variable in different domains

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 14, 2010, 08:01
Default Same variable in different domains
  #1
New Member
 
Join Date: Jun 2010
Posts: 10
Rep Power: 7
caravell78 is on a distinguished road
Dear All, I have two fluid domains that are not physically connected to each other. Now, I need to define as boundary condition on both surfaces of such domains the flux of a gas species, which is a function of the molar fractions on both surfaces:

flux = a*(x@domain1 - x@domain2)

However, I didn't find in CFX manual anything related to how to refer to the same variable (molar fraction, in this case) in different subdomains.

How could I solve this problem???
caravell78 is offline   Reply With Quote

Old   June 14, 2010, 18:44
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,945
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Sounds easy, flux=a*(areaAve(mf)@interface1-areaAve(mf)@interface2) should do it.
ghorrocks is offline   Reply With Quote

Old   June 15, 2010, 01:06
Default Same variable in different domains
  #3
New Member
 
Join Date: Jun 2010
Posts: 10
Rep Power: 7
caravell78 is on a distinguished road
Dear Ghorrocks, first of all, thanks a lot for your fast reply.

Then, if I 've correctly understood, the expression you provided me
calculates the average value of the molar fraction on both surfaces.
Therefore, a constant flux is evaluated along the surfaces.

However, since such surfaces are quite long, I expect a profile of molar
fractions, corresponding to a non-constant profile of flux along the
surfaces.

Can I change your expression to apply it also to my case?
caravell78 is offline   Reply With Quote

Old   June 15, 2010, 07:04
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,945
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
You can't easily change it to match up node by node. You could split your region into sections and match the sections up and do averages by section, this is easy. Another possibility is to make the pair of connecting faces a periodic pair and define a mass fraction source/sink across it. You might also have to use a momentum sink to stop the flow. This is a little harder but still should be possible.
ghorrocks is offline   Reply With Quote

Old   June 15, 2010, 21:51
Default Same variable in different domains
  #5
New Member
 
Join Date: Jun 2010
Posts: 10
Rep Power: 7
caravell78 is on a distinguished road
Actually, I treated the surface as a wall with a kind of "chemical reaction"
to express the loss of mass due to flux, so I don't have to worry about
the momentum sink.
About the node correspondence, I think I have to use a User Fortran
Function to match the nodes... I thought there was a simpler way, but
evidently this is not the case.
I hope future CFX versions will implement this kind of boundary
correspondence in order to avoid for the user to use customized external
functions.

Anyway, thanks again for your advices...
caravell78 is offline   Reply With Quote

Old   June 15, 2010, 22:21
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,945
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Quote:
About the node correspondence, I think I have to use a User Fortran
Function to match the nodes... I thought there was a simpler way, but
evidently this is not the case.
Yes, that's right. Try the periodic boundary approach first, you may be able to get that working. If that does not work you have to go fortran.

Quote:
I hope future CFX versions will implement this kind of boundary
correspondence in order to avoid for the user to use customized external
functions.
No chance. Your application is quite specialised so there will not be much demand for it. But put a feature request in, it will never happen unless it is requested.
ghorrocks is offline   Reply With Quote

Old   June 17, 2010, 22:14
Default Same variable in different domains
  #7
New Member
 
Join Date: Jun 2010
Posts: 10
Rep Power: 7
caravell78 is on a distinguished road
Dear Ghorrocks, I read in the ANSYS manual that it's possible to couple
two solvers. Actually my system can be considered as composed of two
completely separated sub-systems, except for the boundary conditions
at the interfaces, which are coupled to each other.

Now, in your opinion, is it possible to run two different cfx solvers by
coupling the boundary conditions? I have the necessary licenses, but
I didn't find in the manual an example on how to do that?

Thanks in advance
caravell78 is offline   Reply With Quote

Old   June 17, 2010, 23:56
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,945
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
The solver coupling is between a CFD and FEA solver. Not two CFD simulations - there is no point in coupling two CFD simulations, just run them as one. Do not try to couple two solvers, that is a poor way of doing it, it won't work.

Have you tried doing it with periodic boundary conditions? I have mentioned it three times now.....
ghorrocks is offline   Reply With Quote

Old   June 18, 2010, 00:47
Default Periodic Boundary conditions
  #9
New Member
 
Join Date: Jun 2010
Posts: 10
Rep Power: 7
caravell78 is on a distinguished road
I'm trying just now with setting periodic BCs. However, I have a doubt.

My system is composed of two co-axial cylinders (same length), one into
the other and separated by certain distance (the external surfaces are
distant from each other).

I added a "Domain Interface" to link the two surfaces, set up their
correspondence in the GGI mode and set up "Additional Interface Model"
as "No Slip Wall".

However, no other options are available, so: how can I set the flux value
of a species at the interface?

Actually the periodicity must exist for the species compositions and flux,
but not for the absolute pressures, that are different in each side...
caravell78 is offline   Reply With Quote

Old   June 18, 2010, 06:02
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,945
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Can you explain what you are trying to do? A drawing would be nice.
ghorrocks is offline   Reply With Quote

Old   June 18, 2010, 06:18
Default
  #11
New Member
 
Join Date: Jun 2010
Posts: 10
Rep Power: 7
caravell78 is on a distinguished road
OK, sorry for my previous non-clear explanations...

My system is a tube-in-tube device, where one multicomponent
mixture flows in the annulus, whilst another multicomponent mixture flows
in the inner tube (the streams direction is not important).

The inner tube is a membrane, through which some species of the
mixtures selectively pass with different rates (selectivities) from tube
to annulus.

All the fluxes can be expressed by the following formula:

Flux(Species(i)) = a(i) * (PartialPressureInTube(Species(i)) - PartialPressureInAnnulus(Species(i))),

calculated on the corresponding surfaces.

My problem is how to express in CFX the fluxes of the species,
because I don't know how to pick the required variables from
the other side...

later I'll send an image of the system...
caravell78 is offline   Reply With Quote

Old   June 18, 2010, 06:43
Default
  #12
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,945
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
OK, I see. You may also be able to do this with a thin surface or maybe an interface where you turn momentum transfer off but allow a mass fraction flux. Lots of options.
ghorrocks is offline   Reply With Quote

Old   June 18, 2010, 06:56
Default
  #13
New Member
 
Join Date: Jun 2010
Posts: 10
Rep Power: 7
caravell78 is on a distinguished road
I understand what you said, and actually I used a Domain Interface, disabling the momentum transfer and enabling the mass flux. However,
the problem about flux unfortunately still remains...
caravell78 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
expression with variable domains jpshulf CFX 3 November 14, 2008 18:46
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas Main CFD Forum 1 May 30, 2008 04:35
Problems with additional variable Krishna Premi CFX 1 October 29, 2007 09:19
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 05:27
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 11:48.