Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Frozen field simulation not solving for the scalar tracer [CFX]

    • Pau Cunillera Bori
      Subscriber

      Hey!

      I'm working on determining the mixing time of a bioreactor at different rpm. To achieve this, a tracer injection (scalar additional variable) is simulated while monitoring its concentration. I work in CFX.

      Due to the geometry of my fluid domain, steady-state simulations don't converge, so everything is done as a transient simulation, even to establish the velocity fields.

      It works fine when the tracer injection is solved simultaneously with the establishment of the fluid and turbulence fields in a single simulation.

      However, when using a Frozen Field approach, it doesn't work: all equations for the tracer remain at 0 in the solver step, as if it is never injected or calculated (even though the same injection mechanism works in a simultaneous simulation). For a Frozen Field approach, I'm following this procedure:

      1. Perform a transient simulation (15s) of the reactor stirred at the desired speed. There is no tracer injection, and the tracer concentration (initial conditions) is 0 throughout the entire domain.
      2. Add the tracer injection to the same .def file. Using Expert parameters, turn off the equations for the fluid and turbulence while activating the scalar equations.
      3. In the solver, use the file from step 2 and solve with double precision, using the results file from step 1 as initial values.

      This procedure doesn't cause the solver to crash, but the tracer equation (the only one being solved now) remains at 0 (see picture attached).

      Do you have any idea why this might be happening? What am I doing wrong when moving from a simultaneous simulation to a Frozen Field approach?

      Thanks for your help!

    • Mark Owens
      Ansys Employee

      Hi, your tracer must not be seeing the injection. How are you doing the injection? It works fine if I try the same thing on a test case setting the tracer to be non-zero at an inlet. Also, in the expert params make sure you have only turned off the flow equations and not the scalar equations

      EXPERT PARAMETERS:
           solve energy = f
           solve fluids = f
           solve turbulence = f
         END

       

    • Pau Cunillera Bori
      Subscriber

      Hey, 

      The tracer is injected using a source point with an expression (which uses a function which injects it for 1s). 

      I use similar expert parameters:

      EXPERT PARAMETERS:
           solve energy = f (I have never tried that one)
           solve fluids = f
           solve turbulence = f

           solve scalar = t (I added this one)

      END

       

      Thanks :)

    • Mark Owens
      Ansys Employee

      Please add the CCL for the injection

    • Pau Cunillera Bori
      Subscriber
      EXPRESSIONS:
             InjectStep = 0.02 * step((t-1[s])/(-1)[s]) [kg s^-1]

      ADDITIONAL VARIABLE: Tracer Option = Definition Tensor Type = SCALAR Units = [ ] Variable Type = Specific

      SOURCE POINT: Source Point 1 Cartesian Coordinates = 0.005 [m], 0.025 [m], 0.094 [m] Option = Cartesian Coordinates SOURCES: EQUATION SOURCE: Tracer Option = Total Source Total Source = InjectStep
    • Mark Owens
      Ansys Employee

      Hi, that still works for me with a constant source. Try setting a constant source. If that works then it must be that 

      step((t-1[s])/(-1)[s])

      is evaluating to zero for the time you are running. Try creating an expression for it such as

      tracerOn = step((t-1[s])/(-1)[s])

      and plotting it in the expression editor. Also, please note that your tracer run will only start at t=0 if you turn off the option to continue the history when restarting

    • Pau Cunillera Bori
      Subscriber

      oh... make sense. It continued the tracer sim from the last time point of the initial values file where the tracer expression was already 0... I'm solving it now and seems it is working. Let's see :)

       

      How Can disselect the "Continue History From" option in a CCL? I'm sending the simulation to a University cluster using the following file: 

      #!/bin/sh
      # embedded options to bsub - start with #BSUB
      # -- Name of the job --
      #BSUB -J tracer_500rpm2
      # -- specify queue --
      #BSUB -q hpc
      # -- estimated wall clock time (execution time): hh:mm --
      #BSUB -W 48:00
      ### -- specify that we need 2GB of memory per core/slot -- 
      #BSUB -R "rusage[mem=2GB]"
      # -- number of processors
      #BSUB -n 32
      # --specify that the cores MUST BE on a single host! --
      #BSUB -R "span[hosts=1]" 
      # -- user email address --
      # please uncomment the following line and put in your e-mail address,
      # if you want to receive e-mail notifications on a non-default address
      ##BSUB -u s222746@dtu.dk
      # -- mail notification --
      # -- at start --
      #BSUB -B
      # -- at completion --
      #BSUB -N
      # --Specify the output and error file. %J is the job-id --
      # --  -o and -e mean append, -oo and -eo mean overwrite --
      #BSUB -oo cfx_18_IMPIC_%J.out
      #BSUB -eo cfx_18_IMPIC_%J.err
       
      #example of ansys command line call
      /appl/ansys/2023R2/v232/CFX/bin/cfx5solve -def 500rpm_tracer.def -continue-from-file new_tracer_001.res -start-method "Intel MPI Local Parallel" -size 1.5 -part $LSB_DJOB_NUMPROC -pri 1 -double -batch

       

       

    • Mark Owens
      Ansys Employee

      Hi, change -continue-from-file to -initial-file. see

      13.2. Command-Line Options and Keywords for cfx5solve (ansys.com)

Viewing 7 reply threads
  • The topic ‘Frozen field simulation not solving for the scalar tracer [CFX]’ is closed to new replies.