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

Conditional Expression in CFX Pre

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 16, 2012, 22:48
Default
  #41
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,638
Rep Power: 98
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
Lots of options. You can:
1) Use a 1D interpolation function
2) Curve fit a function and stick that in as a CEL expression
3) use nested if statements, if(T>2000[K],if(T<1000[K],7000[kg m^-3],7500[kg m^-3]),8000[kg m^-3]) - this will return 7000, 7500 or 8000 depending on temperature.
ghorrocks is offline   Reply With Quote

Old   May 16, 2012, 22:56
Default Hi Glenn
  #42
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
I am getting again and again these "clipping independent variables" warnings. What is that about?? even though loops are defined from 3-50 value for min to max. should i reduce my time step even more??


Thanks
Danial Q is offline   Reply With Quote

Old   May 16, 2012, 23:02
Default Hi Glenn
  #43
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
I am not familiar with programming stuff..is synatx available in CFX documents or i should use teh same as used for fortran.

Thanks
Danial Q is offline   Reply With Quote

Old   May 16, 2012, 23:07
Default
  #44
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,638
Rep Power: 98
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
The clipping warning says soem properties went beyond the specified bounds. Either there is a region in your flow which exceeds your bounds, or the solution is not converged and weird material properties are being used. To investigate check the first one (find where in the model it is clipping and determine whether it is real), then if it is a convergence thing then try to make your model more numerically stable.

The syntax of CEL is in the CFX reference guide, and examples in the tutorials. It does not use fortran syntax.
ghorrocks is offline   Reply With Quote

Old   May 17, 2012, 20:08
Default HI glenn
  #45
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
If between two domains (fluid & solid[CHT]) ,an interface is defined and under additional interface model tab ,heat transfer is selected also along with thermal contact resistance(with some value), Do i still need to provide heat source?? or solver will automatoically calculate it from fluid (release of heat)? Excerpts from AnSYS DOCUMENTS says it can automaticallly;

"Boundaries between domains that model heat transfer have temperatures and thermal fluxes calculated automatically, and should not have thermal boundary conditions specified. External boundaries (which can represent solids that are not explicitly modeled) require the specification of a thermal boundary condition."
Thanks
Danial Q is offline   Reply With Quote

Old   May 17, 2012, 20:14
Default
  #46
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,638
Rep Power: 98
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
The interface automatically has the temperature coupled across the interface with zero contact resistance. You only need to change it if you want to add a heat source/sink, or a contact resistance.
ghorrocks is offline   Reply With Quote

Old   May 17, 2012, 20:27
Default Hi
  #47
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
So, for specified thermal contact resistance or thin material, sources should be defined by user. If i define subdomain here with solid domain will it make solution better or it is unnecessary? Sorry for stupid questions but i am learning so need answers.

Thanks
Danial Q is offline   Reply With Quote

Old   May 17, 2012, 20:34
Default
  #48
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,638
Rep Power: 98
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
There are many models to choose from.

If you want no contact resistance just leave it at the defaults.

If you want contact resistance use the contact resistance option. Alternately you can specify a thin material, but that just evaluated to a contact resistance so is a different way of doing the same thing.

If the user wants to apply a heat source or sink then use a source.

Subdomains a totally seperate things and are not related to interfaces. An interface connects two domains. A subdomain does not require an interface to connect it to its host domain, it is automatically coupled together.
ghorrocks is offline   Reply With Quote

Old   May 17, 2012, 20:51
Default Hi Glenn
  #49
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
The reason for using thermal contact resistance in my case is , it should transfer all amount of heat to CHTsolid domain through interface. That is why i asked about it. And if i mention the value of thermal contact resistance then should i also mention Energy(heat) sources OR solver will calculate it by value of thermal contcat resistance and total heat released by fluid domain??

Thanks
Danial Q is offline   Reply With Quote

Old   May 17, 2012, 21:00
Default
  #50
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,638
Rep Power: 98
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
I do not understand your question, and I suspect you do not understand how CFX implements contact resistance, heat sources and interfaces. Of course thermal contact resistance transfers all the heat, it increases the resistance so the total heat transferred is reduced.

Can I recommend you do some simple CFX experiments - join two solid regions with an interface and see what happens, then add contact resistance and see what happens, then add a heat source and see what happens. Then you might understand what is going on.
ghorrocks is offline   Reply With Quote

Old   May 18, 2012, 00:42
Default Hi glenn
  #51
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
If the user wants to apply a heat source or sink then use a source.

Suppose I have two domains; fluid and solid and heat released by fluid should heat up the solid domain. In this case, can I mention this "heat released" as a source for solid domain?? or there is no need to define this heat specifically as a source for solid domain.
I doubt that sources only deal with external type heat injection like electricl or thermal heating etc.
Danial Q is offline   Reply With Quote

Old   May 18, 2012, 00:49
Default
  #52
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,638
Rep Power: 98
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
When a fluid domain has an interface with a solid domain the default connection simply couples them together, so the heat flux into one is matched by the heat flux out of the other. At the interface heat in equals heat out. There is no need to specify sources.

If the interface gets heated by some magical means which you are not modelling, so the heat is simply "created" on the surface, and then shared between the solid and fluid domains, then an interface with a heat source will model it. Then you will not have balanced heat fluxes. The heat to the fluid and solid domains will equal the external heat.
ghorrocks is offline   Reply With Quote

Old   May 18, 2012, 00:58
Default Hi Glenn
  #53
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
Thanks Mr GLENN! got it.
i have a plot which shows that cp and density changed when system reached from 3000 K to 300 K . On these basis ,can i assume that phase change occcured in system?
Danial Q is offline   Reply With Quote

Old   May 18, 2012, 07:51
Default
  #54
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,638
Rep Power: 98
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
I will let you work that one out.
ghorrocks is offline   Reply With Quote

Old   May 19, 2012, 05:06
Default Hi GLENN
  #55
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
Could you please explain what is this aerror about??

Details of error:-
----------------
Error detected by routine MAKDAT
CDANAM = LVAR CDTYPE = INTR ISIZE = 301
CRESLT = OLD

i have also attached output file, it returned with error code1.

Thanks
Attached Files
File Type: txt error output.txt (29.5 KB, 2 views)
Danial Q is offline   Reply With Quote

Old   May 19, 2012, 07:23
Default
  #56
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,638
Rep Power: 98
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
The actual error is a few lines earlier:

Code:
Fatal bounds error detected
  ---------------------------
  Variable: liquid Ni.Dynamic Viscosity
  Locale  : splat
liquid Ni.Dynamic Viscosity is set by a function nimu3 which is a CEL expression. I bet this expression evaluates to a negative number. You cannot have a negative viscosity. Well, at least not in this universe.
ghorrocks is offline   Reply With Quote

Old   May 19, 2012, 23:07
Default ooooooooh gosh!!!
  #57
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
I did not have much data and I tried to define a function with two points data and missed the point.
Thanks
Danial Q is offline   Reply With Quote

Old   May 21, 2012, 00:31
Default HI Glenn
  #58
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
I have run my model with defined functions (corrected) and did not find any phase change. Should I go for finer mesh if it could help it.
Even I tried to chech free surface in post processing and unable to have any significant animation thing. I was thinking to do some finer meshing. Could you please suggest if it would be a good idea???

Is that the only one method (intersection method) described in free surface tutorial to observe free surface?

Thanks
Danial Q is offline   Reply With Quote

Old   May 21, 2012, 00:41
Default
  #59
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,638
Rep Power: 98
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
The free surface is defined to be at volume fraction = 0.5, so a isosurface at VF=0.5 lies on the modelled free surface.
ghorrocks is offline   Reply With Quote

Old   May 21, 2012, 01:33
Default HI
  #60
Senior Member
 
Danial
Join Date: Nov 2011
Posts: 179
Rep Power: 6
Danial Q is on a distinguished road
These are the functions generated for the free surface (from codes i got) and i doubt that they are not correct;

dist = sqrt((x - (50^-3) [mm]) ^2 + (y - (50^-3) [mm]) ^2 + (z + (10.5^-3) [mm]) ^2)

liquid = step((rdrop-dist)/1[mm])

rdrop = (10^-3) [mm]
But "NO" DELTA and smearedVF tan function (as given in thoery guide) while curvature factor is assumed 0.25 which ofcouse indicate the strong influence of surface tension.
Is it right or i should necessarily define Delta nd Smeared VF tan fn as suggested by guide.
Danial Q 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
only 1 of many named selections not showing up in cfx pre mihirbhagat CFX 0 July 5, 2011 05:22
Defining a domain in CFX Pre ashtonJ CFX 1 June 13, 2011 02:34
different CFX Pre and Post mesh region mactech001 CFX 9 April 11, 2010 21:08
Problems with adding two meshes together in CFX Pre peterputer1 CFX 2 September 23, 2009 08:08
CFX Pre - TGrid Vivek Vasudevan CFX 2 March 20, 2007 07:31


All times are GMT -4. The time now is 08:45.