CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Thermal Two Fluid (Not Interacting with Each Other) in CFX (https://www.cfd-online.com/Forums/cfx/196726-thermal-two-fluid-not-interacting-each-other-cfx.html)

abidkhan December 13, 2017 10:01

Thermal Two Fluid (Not Interacting with Each Other) in CFX
 
Hello,

Consider the case portrayed in the image, is it possible to analyse (thermal analysis) two fluid (nitrogen and air) which are not interacting with each other (not in direct contact with each other) in CFX? I'm having trouble in assigning material to the fluid domains.

When I assign material air to the domain air, it automatically changed the material of domain nitrogen to material air. When I correct it by changing the material to nitrogen, it changes the material of domain air to material oxygen. It look like these two fluids are interconnected and changing material of one domain updates the material of other fluid domain by itself. I doubt that only one independent fluid can be analyzed in CFX. Is it true?

https://preview.ibb.co/igRrh6/IMG_20171212_200454.png

Opaque December 13, 2017 15:14

ANSYS CFX definitely can model two disconnected fluid domains, but it is not a mainstream setup.

You must enable beta features. For an existing case, open the Case Options , Enable Beta Features, Disable Constant Domain Physics.

At this point, you must be careful since the software may not be completely stable (beta mode). Alternatively, you can set up the case with the same material, different fluid name until most of the setup is done, then enable beta features and try it.

ghorrocks December 13, 2017 16:38

The officially supported method to do this is to use a multicomponent mixture and define the mass fractions to make one region air and the other nitrogen. multicomponent mixtures are not very CPU intensive so this might be a practical option for you.

An alternate approach is to use the beta feature option described by Opaque, but as he says, it is a beta feature so you use it at your own risk.

abidkhan December 13, 2017 20:35

I'll try this today.

abidkhan December 13, 2017 20:37

Quote:

Originally Posted by Opaque (Post 675021)
ANSYS CFX definitely can model two disconnected fluid domains, but it is not a mainstream setup.

You must enable beta features. For an existing case, open the Case Options , Enable Beta Features, Disable Constant Domain Physics.

At this point, you must be careful since the software may not be completely stable (beta mode). Alternatively, you can set up the case with the same material, different fluid name until most of the setup is done, then enable beta features and try it.


I'll try this method today.

abidkhan December 13, 2017 20:41

Quote:

Originally Posted by ghorrocks (Post 675030)
The officially supported method to do this is to use a multicomponent mixture and define the mass fractions to make one region air and the other nitrogen. multicomponent mixtures are not very CPU intensive so this might be a practical option for you.

An alternate approach is to use the beta feature option described by Opaque, but as he says, it is a beta feature so you use it at your own risk.

In multicomponent method, how will I create SS cylinder in separating the two fluid? By multicomponent method, I took I've to add two fluids in fluid domain setup. Then in this case do I've to model the cylinder separating two fluids?

ghorrocks December 14, 2017 00:17

The SS (which I assume is stainless steel) which separates the two gasses is a solid domain and can be given the properties of stainless steel. This is a conjugate heat transfer (CHT) simulation between the two fluid domains and the solid domain between them.

abidkhan December 14, 2017 08:25

Quote:

Originally Posted by ghorrocks (Post 675051)
The SS (which I assume is stainless steel) which separates the two gasses is a solid domain and can be given the properties of stainless steel. This is a conjugate heat transfer (CHT) simulation between the two fluid domains and the solid domain between them.

Thank you very much for you reply. I'll google for tutorial on conjugate heat transfer using multicomponent method. And yes, SS is stainless steel.

Opaque December 14, 2017 15:29

If you follow Glenn's suggestion of using multicomponent approach (which is limited and you will find out later if you need additional functionality) be certain you set the material components as algebraic; therefore, no need to solve any equations nor boundary conditions.

You must initialize these expressions to be 1 in the domain the material exists, and 0 in the other. Similarly for the second material component. How do you do it?

COMPONENT: Material 1
Mass Fraction = inside()@Domain 1

COMPONENT: Material 2
Mass Fraction = inside()@Domain 2

Done!!

abidkhan December 15, 2017 00:15

Quote:

Originally Posted by Opaque (Post 675142)
If you follow Glenn's suggestion of using multicomponent approach (which is limited and you will find out later if you need additional functionality) be certain you set the material components as algebraic; therefore, no need to solve any equations nor boundary conditions.

You must initialize these expressions to be 1 in the domain the material exists, and 0 in the other. Similarly for the second material component. How do you do it?

COMPONENT: Material 1
Mass Fraction = inside()@Domain 1

COMPONENT: Material 2
Mass Fraction = inside()@Domain 2

Done!!

I've turned off the constant domain in the beta feature and tried to solve it and it solved. What are the risks in beta features? Are these the results (i.e. results are not accurate) or the stability of the software?

abidkhan December 15, 2017 00:20

Quote:

Originally Posted by ghorrocks (Post 675051)
The SS (which I assume is stainless steel) which separates the two gasses is a solid domain and can be given the properties of stainless steel. This is a conjugate heat transfer (CHT) simulation between the two fluid domains and the solid domain between them.

I've tried to learn the multicomponents but this method seems to be for mixtures (two fluids interacting with each other) whereas in my case there is no such case of mixing. I'm unable to understand to procedure. If you can spare some time, can you setup the above case (with coarse mesh) and send it to me for my understanding so that I can apply the same methodology in my case.

ghorrocks December 15, 2017 00:39

The risks of beta software is that the software provider (ie ANSYS) does not guarantee the stability, robustness and accuracy of the results. It is not fully tested, and might have physics options which are not compatible with it. So weird things might happen. Also it is not included in the documentation so you don't know much background about it.

So in short: You use beta features at your own risk, and you have to keep an eye out for strange behaviour and incorrect results. If you don't have enough experience to be able to identify strange behaviour and incorrect results then you probably should not be using beta features.

Yes, the multicomponent mixture model was designed to model two gas species which are mixed. But it can be used in your situation by simply setting the mass fractions to pure one species in one domain and pure the other species in the other domain (opaque's suggestion is an example of how to do this). So even though you have to define diffusivities and related mixing parameters, if the species aren't mixing then they don't come into it. So you can define anything you like for diffusivity.

Sorry, I do not have time to set up a case for you. Have a look at the CFX tutorial examples which use multicomponent mixtures for examples on how to set this up. Make sure you do not get confused with multiphase flows - multiphase is completely different. You are looking for multicomponent mixtures.

abidkhan December 15, 2017 06:25

Quote:

Originally Posted by ghorrocks (Post 675183)
The risks of beta software is that the software provider (ie ANSYS) does not guarantee the stability, robustness and accuracy of the results. It is not fully tested, and might have physics options which are not compatible with it. So weird things might happen. Also it is not included in the documentation so you don't know much background about it.

So in short: You use beta features at your own risk, and you have to keep an eye out for strange behaviour and incorrect results. If you don't have enough experience to be able to identify strange behaviour and incorrect results then you probably should not be using beta features.

Yes, the multicomponent mixture model was designed to model two gas species which are mixed. But it can be used in your situation by simply setting the mass fractions to pure one species in one domain and pure the other species in the other domain (opaque's suggestion is an example of how to do this). So even though you have to define diffusivities and related mixing parameters, if the species aren't mixing then they don't come into it. So you can define anything you like for diffusivity.

Sorry, I do not have time to set up a case for you. Have a look at the CFX tutorial examples which use multicomponent mixtures for examples on how to set this up. Make sure you do not get confused with multiphase flows - multiphase is completely different. You are looking for multicomponent mixtures.

Thank you very much for such a detailed reply. So nice of you.

abidkhan February 13, 2018 00:11

Quote:

Originally Posted by Opaque (Post 675142)
If you follow Glenn's suggestion of using multicomponent approach (which is limited and you will find out later if you need additional functionality) be certain you set the material components as algebraic; therefore, no need to solve any equations nor boundary conditions.

You must initialize these expressions to be 1 in the domain the material exists, and 0 in the other. Similarly for the second material component. How do you do it?

COMPONENT: Material 1
Mass Fraction = inside()@Domain 1

COMPONENT: Material 2
Mass Fraction = inside()@Domain 2

Done!!

I'm having issues in beta feature. Now I want to switch to this method quoted above. I tried to setup multicomponent mixture by creating a variable composition mixture. Then I assigned the newly defined mixture to my first fluid domain i.e. "AIR".

While setting up the domain (Air), in "Fluid Models" tab and under "Component Model" Field, I've two components of the mixture i.e. Air and Nitrogen. I clicked on the Air and selected "Algebraic Equation" from the options drop down list.

Now here I'm bit confused about entering the Mass Fraction. Kindly guide me how to enter it algebraically for my two mixtures (air and nitrogen) for the domain "AIR"?

abidkhan February 14, 2018 01:02

Hello,

I've used inside()@Air and inside()@Nitrogen where Air and Nitrogen are domain names. I get following error message:

Code:

Details of error:-
 ----------------
 Error detected by routine PEEKI
 CDANAM = NWORK
 CRESLT = NONE
 
 Current Directory : /FLOW/PHYSICS/MATERIALS/MT2/DENSITY

 +--------------------------------------------------------------------+
 |                    Writing crash recovery file                    |
 +--------------------------------------------------------------------+
 
 Details of error:-
 ----------------
 Error detected by routine DELDAT
 CDANAM = KE
 CRESLT = NONE
 
 Current Directory : /FLOW/SOLUTION/TSTEP0/CLOOP0/ZN1/VERTICES

I also used entering numeric values of Mass Fraction for components instead of inside()@Air compression and no such error is received but in this case when I enter mass fraction 1 for air and 0 for nitrogen it is also automatically updated in nitrogen as well (1 for air and 0 for nitrogen even though I've set 0 for air and 1 nitrogen). Updating component mass fraction in one fluid domain updates the values in other fluid domain.

I'm stuck, please help.

ghorrocks February 14, 2018 16:50

I would not call a domain "Air" or "Nitrogen" as it may get confused with the material names. Give the domains names which are definitely unique.

abidkhan February 14, 2018 21:04

Yes, I tried by renaming the domains too air1 and nitrogen1 but error remains the same.

ghorrocks February 14, 2018 21:19

It is hard to understand CFX error messages, they are very cryptic. But I suspect the error message you quote is saying that density is not defined for one of your materials. So check you have defined the density, or if you are using an equation of state that all the inputs to the EOS are defined.

abidkhan February 19, 2018 03:10

Dear Glenn,

I've fully defined the materials and even tried using the materials present in the CFX library just to check if anything wrong with the properties. I still got the same error. Please see below the detailed error code which is saying something that pressure is not set at any boundary condition in Nitrogen1 domain. However, I'm defining the pressure as 1atm in both air and nitrogen domains in buoyancy setting. May be you understand something from this log:

Code:

+--------------------------------------------------------------------+
 |                  Buoyancy Reference Information                  |
 +--------------------------------------------------------------------+

 Domain Group: Air1
 
  Buoyancy has been activated.  The absolute pressure will include
  hydrostatic pressure contribution, using the following reference
  coordinates: ( 5.39090E-01, 2.37276E+00, 5.39090E-01).

 Domain Group: Nitrogen1
 
  Pressure has not been set at any boundary conditions.
  The pressure will be set to  0.00000E+00 at the following location:
  Domain      : Nitrogen1
  Node        :        1 (equation        1)
  Coordinates : ( 5.28000E-01, 3.51700E+00, 3.19000E-01).

 Domain Group: Nitrogen1
 
  Buoyancy has been activated.  The absolute pressure will include
  hydrostatic pressure contribution, using the following reference
  coordinates: ( 5.28000E-01, 3.51700E+00, 3.19000E-01).
 
 Details of error:-
 ----------------
 Error detected by routine PEEKI
 CDANAM = NWORK
 CRESLT = NONE
 
 Current Directory : /FLOW/PHYSICS/MATERIALS/MT2/DENSITY

 +--------------------------------------------------------------------+
 |                    Writing crash recovery file                    |
 +--------------------------------------------------------------------+
 
 Details of error:-
 ----------------
 Error detected by routine DELDAT
 CDANAM = KE
 CRESLT = NONE
 
 Current Directory : /FLOW/SOLUTION/TSTEP0/CLOOP0/ZN1/VERTICES

 +--------------------------------------------------------------------+
 |                An error has occurred in cfx5solve:                |
 |                                                                    |
 | The ANSYS CFX solver exited with return code 1.  No results file  |
 | has been created.                                                  |
 +--------------------------------------------------------------------+

End of solution stage.


ghorrocks February 19, 2018 04:57

The line "Pressure has not been set at any boundary conditions. The pressure will be set to 0.00000E+00 at the following location" is ominous.

It appears you have not set the pressure, so the solver has set a point to zero pressure. If you have not set a reference pressure properly this will result in zero and possibly negative absolute pressures and this will destroy most EOS equations and give you a density error.

Check that your initial and/or boundary conditions are set correctly, such that the pressure is properly defined.


All times are GMT -4. The time now is 06:25.