CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Code behaves strangely when the geometry is changed

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2009, 16:04
Default Hi All,, With reference to
  #1
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Hi All,,

With reference to my previous message, I am solving an electro osmotic flow in a simple square channel. Here is a paper from that, but right now I am neglecting the velocity term.. I finished coding it but had some convergence issues because of the large values of the transport properties and hence I non dimensionalised them and now the code is
converging, my concentration values at inlet and outlet boundary conditions are same (=1). Hence the result should be 1 throughout right.. but stangely I am not getting 1.. instead I am getting some strange values... as mentioned in the earlier mesage, I would like to know whether I have coded them correctly or not..

Kindly do the needful...

Thanks

coupledFoam.tar.gz
controlDict
nandiganavishal is offline   Reply With Quote

Old   January 7, 2009, 16:26
Default Sorry I couldnt upload the pap
  #2
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Sorry I couldnt upload the paper because of the file size limit... I am attaching the page where all the equations are given..

D1 = 1.96e-9 m2/s
D2 = 0.87e-9 m2/s
Z1 = 1
Z2 = -1
omega1 = D1/RT, R = 8.314J/molK, T = 297K
omega2 = D2/RT


nandiganavishal is offline   Reply With Quote

Old   January 7, 2009, 16:27
Default Sorry I couldnt upload the pap
  #3
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Sorry I couldnt upload the paper because of the file size limit... I am attaching the page where all the equations are given..

D1 = 1.96e-9 m2/s
D2 = 0.87e-9 m2/s
Z1 = 1
Z2 = -1
omega1 = D1/RT, R = 8.314J/molK, T = 297K
omega2 = D2/RT

I have normalised all the equations and proceeded the coding and I am getting some strange results as mentioned previously.. Kindly give your valuable suggestions...

Thanks

Regards

Vishal



nandiganavishal is offline   Reply With Quote

Old   January 7, 2009, 16:37
Default Sorry I couldnt upload the pap
  #4
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Sorry I couldnt upload the paper because of the file size limit...Here are the equations

dC1/dt = div(D1*gradC1)+ div(omega1*Z1*F*C1*grad(Phi))

dC2/dt = div(D2*gradC2)+ div(omega2*Z2*F*C2*grad(Phi))

div(grad(Phi)) = (-F*Z1*C1-F*Z2*C2)/e0*er

where,
Phi = electric field
F - faradays constant
e0 = permittivity of vacuum
er = permittivity of water = 80
D - diffusion coefficient
D1 = 1.96e-9 m2/s
D2 = 0.87e-9 m2/s
Z = valence number
Z1 = 1
Z2 = -1
omega1 = D1/RT, R = 8.314J/molK, T = 297K
omega2 = D2/RT

I have normalised all the equations and proceeded the coding and I am getting some strange results as mentioned previously.. Kindly give your valuable suggestions...

Thanks

Regards

Vishal
nandiganavishal is offline   Reply With Quote

Old   January 8, 2009, 03:17
Default hi Vishal, I am not very sure
  #5
Member
 
Sachin Kanetkar
Join Date: Mar 2009
Posts: 57
Rep Power: 17
sachin is on a distinguished road
hi Vishal,
I am not very sure but i am thinking this is because the grid size. I have strong doubts that the convergence also fails because of the big grid size, maybe there are issues with time step and Courant no also. Since your details never mentioned about these things. maybe that is missing.
This are just suggestions havent gone thru those long details.
regards
Sachin
sachin is offline   Reply With Quote

Old   January 8, 2009, 13:06
Default Thanks Sachin.. I had figured
  #6
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Thanks Sachin.. I had figured out the problem and now the code is working fine... Thanks for the help.
nandiganavishal is offline   Reply With Quote

Old   January 8, 2009, 17:29
Default Hi, As mentioned earlier my
  #7
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Hi,

As mentioned earlier my code is working properly and I get the desired results.

However, I have some queries. I have four variables C1,C2 and Phi and U. I obtain the values of these variables at each time step. Now I would like to calculate another parameter
T1 = -D1*grad(C1) - K1 * C1 * grad (Phi) + C1 * U
T2 = -D2*grad(C2) - K2 * C2 * grad (Phi) + C2 * U

Where D1,D2,K1,K2 are constants...

Then I would like to calculate I by integrating T1 and T2 over the cross section given by the formula

I = integral over S {(Z1*F*T1)+(Z2*F*T2)} dS

where S is the cross sectional area of the channel..

Kindly let me know how to proceed further..

Thanks

Regards

Vishal
nandiganavishal is offline   Reply With Quote

Old   January 14, 2009, 15:35
Default Regards Vishal
  #8
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Regards

Vishal
nandiganavishal is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
has someone changed the prepdf's thermo.db yinyue FLUENT 1 May 19, 2017 03:16
esqr - definition changed from version 9.2 to 9.3? Andreas FLOW-3D 1 February 8, 2009 23:23
Math rendering default changed to always PNG Jonas Larsson CFD-Wiki 0 December 10, 2005 10:00
Wiki URL changed Jonas Larsson CFD-Wiki 0 November 7, 2005 16:56
Can the changed mesh file be used? Kim FLUENT 5 September 8, 2004 09:49


All times are GMT -4. The time now is 11:27.