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

[CFX] one domain & several initial condition

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

Like Tree2Likes
  • 2 Post By evcelica

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2021, 04:19
Default [CFX] one domain & several initial condition
  #1
New Member
 
Jin Seok Lee
Join Date: Aug 2021
Posts: 10
Rep Power: 2
jins9158 is on a distinguished road
Dear experts

I am korean CFD user
I am going to simulate about VAC(Ventilation Air Conditioning) using CFX program.
I made mixture's material which was consist of N2, O2, Ar, CO2, H2O
because I need to know mass fraction about CO2, H2O for result.

Now, there is one domain for fluid zone and I need to set several initial condition because they are different according to coordinate.
I want to divide 4 pats using CEL expression to set initial condition

For example
IF ( 0 [mm] < x < 2000[mm], 0 [mm] < z < 2000[mm], co2 mass fraction = 0.0018
IF ( 0 [mm] < x < 2000[mm], 0 [mm] < z < 2000[mm], H2O mass fraction = 0.0018

Could you give some ideas for me?
Thank you for reading my question
jins9158 is offline   Reply With Quote

Old   August 17, 2021, 14:11
Default
  #2
Senior Member
 
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,066
Rep Power: 20
evcelica is on a distinguished road
you could try:
if((abs(1[m]-x))<1[m],if((abs(1[m]-z))<1[m],0.0018,0),0)
Opaque and aero_head like this.
evcelica is offline   Reply With Quote

Old   August 17, 2021, 20:07
Default
  #3
New Member
 
Jin Seok Lee
Join Date: Aug 2021
Posts: 10
Rep Power: 2
jins9158 is on a distinguished road
Thank you for replying my question

that's good to me

But I am not sure that your advise is adequate.


I need to set 4 initial condition

1. o[mm] < x < 2705[mm], 0[mm] < z < 3460[mm] --> H2O: 0.018, CO2:0.02, T: 30[C]
2. 2705[mm] < x < 6940[mm], 0[mm] < z < 3460 [mm] --> H2O:0.017, CO2:0.019, T: 29[C]
3. 0[mm] < x < 2580[mm], 3460[mm] < z < 6440 [mm] --> H2O:0.016, CO2:0.018, T: 28[C]
4. 2705 [mm] < x < 4340 [mm], 3460[mm] < z < 5962[mm] --> H2O:0.015, CO2:0.017, T:27[C]

I think it is difficult to set 4 initial condition by using IF

Is is possible to set initial conditions by using IF?

Also I am not sure about considering coordinate X, Z only because fluid zone is 3d geometry

But I only considered coordinate of X, Z

is it make matter?

Thank you for reading my question and I hope to answer

Last edited by jins9158; August 18, 2021 at 01:04.
jins9158 is offline   Reply With Quote

Old   August 18, 2021, 02:34
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 16,840
Rep Power: 132
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Can't you just have 4 statement's like Erik's suggestion to cover your 4 zones? It does not look that hard.

Alternately, you can use 1D or 3D interpolation functions or write a user fortran routine to do it. You can also fit a curve to the function and put the fitting function in as a CEL expression. So you have lots of alternative ways of doing it.

Yes, you can set initial conditions with if statements.

I do not understand your comments about considering X and Z. I do not know what you are trying to model so I cannot say if that is appropriate.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   August 18, 2021, 03:06
Default
  #5
New Member
 
Jin Seok Lee
Join Date: Aug 2021
Posts: 10
Rep Power: 2
jins9158 is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Can't you just have 4 statement's like Erik's suggestion to cover your 4 zones? It does not look that hard.

Alternately, you can use 1D or 3D interpolation functions or write a user fortran routine to do it. You can also fit a curve to the function and put the fitting function in as a CEL expression. So you have lots of alternative ways of doing it.

Yes, you can set initial conditions with if statements.

I do not understand your comments about considering X and Z. I do not know what you are trying to model so I cannot say if that is appropriate.

--------

I had mistake

I need to set initial condition each about co2, h2o, T

They need to change according to coordinates same as below.


1. o[mm] < x < 2705[mm], 0[mm] < z < 3460[mm] --> H2O: 0.018, CO2:0.02, T: 30[C]
2. 2705[mm] < x < 6940[mm], 0[mm] < z < 3460 [mm] --> H2O:0.017, CO2:0.019, T: 29[C]
3. 0[mm] < x < 2580[mm], 3460[mm] < z < 6440 [mm] --> H2O:0.016, CO2:0.018, T: 28[C]
4. 2705 [mm] < x < 4340 [mm], 3460[mm] < z < 5962[mm] --> H2O:0.015, CO2:0.017, T:27[C]



And you gave me that "you couldn't understand about considering X and Z"

So, I answer your opinion.

My Fluid Zone is 3D model.
So, I think that I need to consider x, y, z coordinates to set initial condition
But, I just considered about X, Z coordinate.
It is right? I am not sure

I hope to give some ideas for me

Thank you
jins9158 is offline   Reply With Quote

Old   August 18, 2021, 03:17
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 16,840
Rep Power: 132
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
If you are saying that your initial condition has 3D regions with difference mass fractions - then, yes, the if() statement approach can become a problem.

In that case a 3D interpolation function will work much better. Have a look at the 3D interpolation functions.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   August 19, 2021, 04:27
Default
  #7
New Member
 
Jin Seok Lee
Join Date: Aug 2021
Posts: 10
Rep Power: 2
jins9158 is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
If you are saying that your initial condition has 3D regions with difference mass fractions - then, yes, the if() statement approach can become a problem.

In that case a 3D interpolation function will work much better. Have a look at the 3D interpolation functions.


Thank you.

I will try using 3d interpolation function.
jins9158 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compressible flows with larger Courant numbers Tobi OpenFOAM Running, Solving & CFD 5 February 26, 2021 15:20
Maximum number of iterations exceeded chtmultiregionsimpleFoam Moncef OpenFOAM Running, Solving & CFD 28 July 13, 2020 14:26
decompose dependent solution arionfard OpenFOAM 3 December 10, 2018 09:36
Cannot run the code properly: very large time step continuity error crst15 OpenFOAM Running, Solving & CFD 9 December 14, 2014 18:17
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 13:12


All times are GMT -4. The time now is 04:19.