TAGGED: ansys-cfx, cfx-tracer-simulation, scalar
-
-
July 30, 2024 at 3:00 pmPau Cunillera BoriSubscriber
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! -
July 30, 2024 at 4:44 pmMark OwensAnsys 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Â
-
July 31, 2024 at 9:53 amPau Cunillera BoriSubscriber
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 :)
-
July 31, 2024 at 10:05 amMark OwensAnsys Employee
Please add the CCL for the injection
-
July 31, 2024 at 10:13 amPau Cunillera BoriSubscriber
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 -
July 31, 2024 at 10:34 amMark OwensAnsys 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 -
July 31, 2024 at 10:48 amPau Cunillera BoriSubscriber
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Â
Â
-
July 31, 2024 at 12:58 pmMark OwensAnsys Employee
Hi, change -continue-from-file to -initial-file. see
13.2. Command-Line Options and Keywords for cfx5solve (ansys.com)
-
- The topic ‘Frozen field simulation not solving for the scalar tracer [CFX]’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Fluent fails with Intel MPI protocol on 2 nodes
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script error Code: 800a000d
- Encountering Error in Heterogeneous Surface Reaction
-
1191
-
513
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.