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

develope a solver

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 21, 2013, 08:21
Default develope a solver
  #1
Member
 
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 13
AmirBaqa1987 is on a distinguished road
Hi everyone
I want to develop a solver by adding the following Eq to simpleFoam solver:



,c,k,D and S are constant.
V:velocity vector
T and L are scalars.

I've considered these assumptions:
m=fvc::grad(L)
n=fvc::grad(T)/T
and define m and n in createfields and finally write TEqn as bellow:

Code:
  fvScalarMatrix TEqn
 (
   rho*c*fvm::div(phi,T)
  -fvm::laplacian(k,T)
 );

 solve(TEqn == rho*c*T*(D*(m&n)+S*(n&n)));
  m=fvc::grad(V);
  n=fvc::grad(T)/T;
dimensions of variable and constants are listed below:
[1 -3 0 0 0 0 0 ]
c [0 2 -2 -1 0 0 0 ]
D&S [0 2 -1 0 0 0 0]
k [1 1 -3 -1 0 0 0]
variable L is volume fraction and has no dimension.
variable T is temperature:[0 0 0 1 0 0 0]

I've made this new solver with wmake command successfully but when I run the case and want to complete the solver I confronted the following Fatal Error:
Code:
--> FOAM Warning : 
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1175
    dlopen error : libsimpleSwakFunctionObjects.so: cannot open shared object file: No such file or directory
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
    could not load "libsimpleSwakFunctionObjects.so"

--> FOAM FATAL ERROR: 
incompatible dimensions for operation 
    [T[1 -1 -3 0 0 0 0] ] - [T[1 -1 -3 2 0 0 0] ]

    From function checkMethod(const fvMatrix<Type>&, const fvMatrix<Type>&)
    in file /opt/openfoam211/src/finiteVolume/lnInclude/fvMatrix.C at line 1316.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  void Foam::checkMethod<double>(Foam::fvMatrix<double> const&, Foam::fvMatrix<double> const&, char const*) in "/home/amir/OpenFOAM/amir-2.1.1/platforms/linux64GccDPOpt/bin/nanoHeatSimpleFoam"
#3  
 at nanoHeatSimpleFoam.C:0
#4  
 in "/home/amir/OpenFOAM/amir-2.1.1/platforms/linux64GccDPOpt/bin/nanoHeatSimpleFoam"
#5  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6  
 in "/home/amir/OpenFOAM/amir-2.1.1/platforms/linux64GccDPOpt/bin/nanoHeatSimpleFoam"
Aborted (core dumped)

can anybody help?
Thanks
Arjang
AmirBaqa1987 is offline   Reply With Quote

Old   September 22, 2013, 21:11
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by AmirBaqa1987 View Post
Hi everyone
I want to develop a solver by adding the following Eq to simpleFoam solver:



,c,k,D and S are constant.
V:velocity vector
T and L are scalars.
Hi Arjang,

Im not an expert in this field. but are you sure your equation's dimension is compatible? In the following equation, I think the left's dimension is not the same with the right one.

\rho c V \cdot \nabla T = \rho c D \nabla L \cdot \nabla T
sharonyue is offline   Reply With Quote

Old   September 23, 2013, 02:17
Default
  #3
Member
 
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 13
AmirBaqa1987 is on a distinguished road
Hi Forrest
I've found the problem.
I've made a miss and set the dimension of k in the Transport Properties Dictionary wrong, I mean:
K [1 1 -3 1 0 0 0] instead of k [1 1 -3 -1 0 0 0].
I modify this dictionary and my problem is solved.
AmirBaqa1987 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 10:52
3d vof Smaras FLUENT 2 February 19, 2013 07:58
Interfoam blows on parallel run danvica OpenFOAM Running, Solving & CFD 16 December 22, 2012 03:09
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 15:08
How to develope my own solver ztdep OpenFOAM Running, Solving & CFD 0 September 15, 2005 11:41


All times are GMT -4. The time now is 09:51.