Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Fluent Adaptation with Named Expressions

    • vedama
      Subscriber
      Hello,nI have created an expression using the Named Expressions feature and I would like to adapt the grid based off this expression. Let's say my expression p=AdaptionSpaceGradient(StaticPressure)*.01 and I would like to adapt the top 10% of cells that correspond to this expression, similar to what we do with Adapt-Cell Registers-Field Variables.nHowever, when I export this expression into the adapt dialog box, I getnExpected type is Bool, Expression type is Double.nI understand what this means but is there a way to go about adapting the expression based on the top 10% as mentioned earlier? Or has anyone been able to find a workaround for defining Named Expressions as Bools without using IF? Any help would be much appreciated.nnThanksn
    • YasserSelima
      Subscriber
      First, add this expressionnIF( p>0 , TRUE, FALSE) let's call it boolean_pnThen select boolean_p for adaption expression and check the number of cells marked for refinement.Now you need a trial and error process ... replace zero in the expression with a number and check how many cells are marked for Adaption .. repeat the process until you have 10% of the original number of cellsn n
    • vedama
      Subscriber

      First, add this expressionIF( p>0 , TRUE, FALSE) let's call it boolean_pThen select boolean_p for adaption expression and check the number of cells marked for refinement. Now you need a trial and error process ... replace zero in the expression with a number and check how many cells are marked for Adaption .. repeat the process until you have 10% of the original number of cells/forum/discussion/comment/108396#Comment_108396

      Sorry I don't understand, but what are TRUE and FALSE? If I enter that expression as is, I get:nNameError: name 'TRUE' is not definednI understand your logic but I'm unsure as to how TRUE and FALSE would apply in my case. I also would like to have this as a dynamic process so I can do multiple iterations of adaption by taking 10% every time. But that's a question for once I just get past this first hurdle.n
    • YasserSelima
      Subscriber
      replace true and false with 1 and 0 ... let\s seen
    • YasserSelima
      Subscriber
      I am not sure how you can select the top 10% by another expression. sorryn
Viewing 4 reply threads
  • The topic ‘Fluent Adaptation with Named Expressions’ is closed to new replies.
[bingo_chatbox]