
[Sponsors] 
November 29, 2010, 15:24 
emag beta feature: charge density

#1 
New Member
Charlotte
Join Date: Oct 2009
Posts: 16
Rep Power: 9 
Sponsored Links
I'm trying to simulate a simple EHD flow with CFX: it's a 2D channel flow with the top wall at an eletric potential +V and the bottom wall at V. My fluid contains anion and cation and I want to see how their spatial distributions are affected by the electric potential. I got an example from the customer portal with charged particles. However, this is for discrete spatial distribution (ie charged particles). Whereas I need the charge density to be determined from my anion/cation concentrations. Is it possible to do this with CFX12.0? If so, how do I implement the continuous distribution for the charge density? Thanks, Charlotte 

Sponsored Links 
November 29, 2010, 18:03 

#2 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 13,651
Rep Power: 105 
You will have to do this using something like additional variables, and link the additional variable to the flow using source terms.


November 30, 2010, 14:16 

#3 
Senior Member
Join Date: Mar 2009
Location: Europe
Posts: 168
Rep Power: 10 
In general for beta feature I would expect development and bug fixes with newer releases. So I would go for 12.1 or even for the upcoming version 13.0.
There may be exceptions from this rule of thumb, however I guess its worth to try. 

December 1, 2010, 15:12 

#4 
New Member
Charlotte
Join Date: Oct 2009
Posts: 16
Rep Power: 9 
Tanks for your replies. Starting 12.1, this beta feature became a paid feature . So I'm stuck with 12.0 for now.
It seems that the emag beta feature is advanced enough for my case. I found some slides where they did simulations much more complex than mine here: http://www.mesco.pl/produkty/ansys/c...netics@cfx.pdf I started to implement the extra variables and sources, but my code became unstable. I guess I need to doublecheck my equations and play with the Source coefficient. I'll update this post if I get better results. Charlotte 

March 22, 2011, 10:14 

#5 
New Member
Charlotte
Join Date: Oct 2009
Posts: 16
Rep Power: 9 
I was able to reproduce most of Bazant results (2004, Physical Review E, "Diffusecharge dynamics in electrochemical systems") with the following setup. Double precision is needed and the accuracy is highly dependent on the mesh quality. The problem here is 1D (I did setup a 2D cases with the same method without any trouble).
++    CFX Command Language for Run    ++ LIBRARY: CEL: EXPRESSIONS: Total Mass = volumeInt(conc)@Default Domain V = 0.1 concdphidxEXP = conc*dphidx delta = 0.1 dphidxEXP = max(0,phi.Gradient X*1[m]) eps = 0.05 oldRhoEXP = rho rhodphidxEXP = rho*dphidx sourceConc = eps*Rhodphidx.Gradient X*1[kg m^2 s^1] sourcePhi = rho*1[kg m^3 s^1] sourceRho = eps*Concdphidx.Gradient X*1[kg m^2 s^1] END END ADDITIONAL VARIABLE: Concdphidx Boundary Only Field = Off Option = Definition Tensor Type = SCALAR Units = [ ] Update Loop = TRANS_LOOP Variable Type = Specific END ADDITIONAL VARIABLE: Rhodphidx Boundary Only Field = Off Option = Definition Tensor Type = SCALAR Units = [ ] Update Loop = TRANS_LOOP Variable Type = Specific END ADDITIONAL VARIABLE: conc Option = Definition Tensor Type = SCALAR Units = [ ] Variable Type = Specific END ADDITIONAL VARIABLE: dphidx Boundary Only Field = Off Option = Definition Tensor Type = SCALAR Units = [ ] Update Loop = TRANS_LOOP Variable Type = Specific END ADDITIONAL VARIABLE: phi Boundary Only Field = Off Option = Definition Tensor Type = SCALAR Units = [ ] Variable Type = Specific END ADDITIONAL VARIABLE: rho Option = Definition Tensor Type = SCALAR Units = [ ] Variable Type = Specific END MATERIAL: nonDim Material Group = User Option = Pure Substance PROPERTIES: Option = General Material EQUATION OF STATE: Density = 1 [kg m^3] Molar Mass = 1.0 [kg kmol^1] Option = Value END SPECIFIC HEAT CAPACITY: Option = Value Specific Heat Capacity = 1 [J kg^1 K^1] Specific Heat Type = Constant Pressure END DYNAMIC VISCOSITY: Dynamic Viscosity = 1 [Pa s] Option = Value END THERMAL CONDUCTIVITY: Option = Value Thermal Conductivity = 1 [W m^1 K^1] END END END END FLOW: Flow Analysis 1 SOLUTION UNITS: Angle Units = [rad] Length Units = [m] Mass Units = [kg] Solid Angle Units = [sr] Temperature Units = [K] Time Units = [s] END ANALYSIS TYPE: Option = Transient EXTERNAL SOLVER COUPLING: Option = None END INITIAL TIME: Option = Automatic with Value Time = 0 [s] END TIME DURATION: Option = Total Time Total Time = 2 [s] END TIME STEPS: Option = Timesteps Timesteps = 0.001 [s] END END DOMAIN: Default Domain Coord Frame = Coord 0 Domain Type = Fluid Location = B16 BOUNDARY: Symmetry Boundary Type = SYMMETRY Location = F17.16,F18.16,F19.16,F21.16 END BOUNDARY: Vmoins Boundary Type = WALL Location = F22.16 BOUNDARY CONDITIONS: ADDITIONAL VARIABLE: conc Additional Variable Flux = rho*dphidx*1[kg m^2 s^1]*eps Option = Flux in END ADDITIONAL VARIABLE: phi Additional Variable Value = V+delta*eps*dphidx Option = Value END ADDITIONAL VARIABLE: rho Additional Variable Flux = conc*dphidx*1[kg m^2 s^1]*eps Option = Flux in END MASS AND MOMENTUM: Option = No Slip Wall END END END BOUNDARY: Vplus Boundary Type = WALL Location = F20.16 BOUNDARY CONDITIONS: ADDITIONAL VARIABLE: conc Additional Variable Flux = Rhodphidx*1[kg m^2 s^1]*eps Option = Flux in END ADDITIONAL VARIABLE: phi Additional Variable Value = Veps*delta*dphidx Option = Value END ADDITIONAL VARIABLE: rho Additional Variable Flux = Concdphidx*1[kg m^2 s^1]*eps Option = Flux in END MASS AND MOMENTUM: Option = No Slip Wall END END END DOMAIN MODELS: BUOYANCY MODEL: Option = Non Buoyant END DOMAIN MOTION: Option = Stationary END MESH DEFORMATION: Option = None END REFERENCE PRESSURE: Reference Pressure = 1 [atm] END END FLUID DEFINITION: Fluid 1 Material = nonDim Option = Material Library MORPHOLOGY: Option = Continuous Fluid END END FLUID MODELS: ADDITIONAL VARIABLE: Concdphidx Additional Variable Value = concdphidxEXP Option = Algebraic Equation END ADDITIONAL VARIABLE: Rhodphidx Additional Variable Value = rhodphidxEXP Option = Algebraic Equation END ADDITIONAL VARIABLE: conc Kinematic Diffusivity = eps*1[m^2 s^1] Option = Diffusive Transport Equation END ADDITIONAL VARIABLE: dphidx Additional Variable Value = dphidxEXP Option = Algebraic Equation END ADDITIONAL VARIABLE: phi Kinematic Diffusivity = eps^2*1[m^2 s^1] Option = Poisson Equation END ADDITIONAL VARIABLE: rho Kinematic Diffusivity = eps*1[m^2 s^1] Option = Diffusive Transport Equation END COMBUSTION MODEL: Option = None END HEAT TRANSFER MODEL: Option = None END THERMAL RADIATION MODEL: Option = None END TURBULENCE MODEL: Option = Laminar END END SUBDOMAIN: Subdomain 1 Coord Frame = Coord 0 Location = B16 SOURCES: EQUATION SOURCE: conc Option = Source Source = sourceConc Source Coefficient = 1 [kg m^3 s^1] END EQUATION SOURCE: phi Option = Source Source = sourcePhi Source Coefficient = 1 [kg m^3 s^1] END EQUATION SOURCE: rho Option = Source Source = sourceRho Source Coefficient = 1 [kg m^3 s^1] END END END END INITIALISATION: Option = Automatic INITIAL CONDITIONS: Velocity Type = Cartesian ADDITIONAL VARIABLE: conc Additional Variable Value = 1 [] Option = Automatic with Value END ADDITIONAL VARIABLE: phi Additional Variable Value = V*x*1[m^1] Option = Automatic with Value END ADDITIONAL VARIABLE: rho Additional Variable Value = 0 [] Option = Automatic with Value END CARTESIAN VELOCITY COMPONENTS: Option = Automatic with Value U = 0 [m s^1] V = 0 [m s^1] W = 0 [m s^1] END STATIC PRESSURE: Option = Automatic with Value Relative Pressure = 0 [Pa] END END END OUTPUT CONTROL: MONITOR OBJECTS: MONITOR BALANCES: Option = Full END MONITOR FORCES: Option = Full END MONITOR PARTICLES: Option = Full END MONITOR POINT: TotalMass Expression Value = Total Mass Option = Expression END MONITOR POINT: rho Vmoins Cartesian Coordinates = 0.95 [m], 0 [m], 0.01 [m] Option = Cartesian Coordinates Output Variables List = rho END MONITOR POINT: rhoVplus Cartesian Coordinates = 0.95 [m], 0 [m], 0.01 [m] Option = Cartesian Coordinates Output Variables List = rho END MONITOR RESIDUALS: Option = Full END MONITOR TOTALS: Option = Full END END RESULTS: File Compression Level = Default Option = Standard END TRANSIENT RESULTS: Transient Results 1 File Compression Level = Default Option = Standard OUTPUT FREQUENCY: Option = Time List Time List = 0 [s], 0.1 [s], 0.5 [s], 1 [s], 2 [s], 3 [s], 4 [s], 5 [s] END END END SOLVER CONTROL: ADVECTION SCHEME: Option = High Resolution END CONVERGENCE CONTROL: Maximum Number of Coefficient Loops = 30 Minimum Number of Coefficient Loops = 1 Timescale Control = Coefficient Loops END CONVERGENCE CRITERIA: Conservation Target = 0.01 Residual Target = 1e06 Residual Type = RMS END EQUATION CLASS: av ADVECTION SCHEME: Option = High Resolution END TRANSIENT SCHEME: Option = Second Order Backward Euler TIMESTEP INITIALISATION: Option = Automatic END END END EQUATION CLASS: continuity ADVECTION SCHEME: Option = High Resolution END TRANSIENT SCHEME: Option = Second Order Backward Euler TIMESTEP INITIALISATION: Option = Automatic END END END TRANSIENT SCHEME: Option = Second Order Backward Euler TIMESTEP INITIALISATION: Option = Automatic END END END EXPERT PARAMETERS: solve fluids = f END END COMMAND FILE: Version = 12.1 Results Version = 12.1 END SIMULATION CONTROL: EXECUTION CONTROL: EXECUTABLE SELECTION: Double Precision = On END INTERPOLATOR STEP CONTROL: Runtime Priority = Standard MEMORY CONTROL: Memory Allocation Factor = 1.0 END END PARALLEL HOST LIBRARY: HOST DEFINITION: nopc Host Architecture String = winntamd64 Installation Root = C:\Program Files\ANSYS Inc\v%v\CFX END END PARTITIONER STEP CONTROL: Multidomain Option = Independent Partitioning Runtime Priority = Standard EXECUTABLE SELECTION: Use Large Problem Partitioner = Off END MEMORY CONTROL: Memory Allocation Factor = 1.0 END PARTITIONING TYPE: MeTiS Type = kway Option = MeTiS Partition Size Rule = Automatic Partition Weight Factors = 0.50000, 0.50000 END END RUN DEFINITION: Run Mode = Full Solver Input File = \ C:\Users\Charlotte\AppData\Local\Temp\Electrodes_1 996_Working\dp0\CFX\ \CFX\Work1\Fluid Flow.def END SOLVER STEP CONTROL: Runtime Priority = Standard EXECUTABLE SELECTION: Double Precision = On END MEMORY CONTROL: Memory Allocation Factor = 1.0 END PARALLEL ENVIRONMENT: Number of Processes = 2 Start Method = HP MPI Local Parallel Parallel Host List = nopc*2 END END END END 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How to calculate surface charge density in Flow3D?  leeyee  FLOW3D  1  September 2, 2010 22:59 
Error in compiling UDF for computation of space charge density  greensociety  FLUENT  1  July 21, 2009 02:29 
REAL GAS UDF  brian  FLUENT  6  September 11, 2006 08:23 
Warning 097  AB  CDadapco  6  November 15, 2004 05:41 
Space charge density in ElectroStaticPrecipitator  Vijay  CFX  1  September 30, 2004 19:43 
Sponsored Links 