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

help with basic coupled system

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 17, 2010, 16:44
Question help with basic coupled system
  #1
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
Hi, I'm in the process of learning OpenFOAM (been at it for a week now) and I'm trying out some of my own simple models (more like thought experiments to grasp basic concepts of OpenFOAM).

I'm comparing these models to the same model in comsol to make sure that I'm doing everything properly in OpenFOAM. My eventual application will involve highly coupled equations.


One of the tasks that I'm currently trying involves two coupled transport equations on a simple 1m x 1m grid (I'm modelling this as 1D though with zero gradient boundary conditions everywhere except for the left, x=0, and right walls, x=1). My model implementation in OpenFOAM converges only for certain situations (although comsol has no problem with it) and I'm looking for any tips or suggestions on how to improve this or make my model more efficient.

I've attached my solver, but to summarize, the model I'm trying to solve has the following equations:

TEqn: laplacian(DT,T) - beta*c
CEqn: div(phi,c) - laplacian(gamma*c,c) - alpha*T

with boundary conditions:
x=0:
c=10
T=298

x=1:
c=5
dT/dx=-10*c

and other parameters:
DT=4e-3
beta = 1.0
alpha = 0.001
gamma = 0.01
and phi is just a constant velocity field of (0.01 0 0)

My OpenFOAM implementation works well for values of alpha=0.001 but when I try alpha=0.01, it will not converge (and yet comsol has no problem with it). I've attached my solver (ct2.C). My suspicion is that the problem is with the relaxation factors but they don't seem to help me.

Any tips/suggestions?
Attached Files
File Type: c ct2.C (3.6 KB, 15 views)
File Type: h coupled_Tgradient_boundary.H (540 Bytes, 12 views)
benk 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
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56
fluid mass in coupled FSI system Dr. V. Kumar CFX 10 July 16, 2007 10:23
Need ideas-fuel discharge system Jan CFX 1 October 9, 2006 08:16
Need ideas-fuel discharge system Jan Main CFD Forum 0 October 9, 2006 04:27
interfced coupled system jabe CFX 4 April 22, 2002 19:28


All times are GMT -4. The time now is 12:28.