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

Adding Equations in custom solver

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2015, 15:18
Default Adding Equations in custom solver
  #1
New Member
 
rafath
Join Date: Jun 2014
Location: mumbai
Posts: 24
Rep Power: 11
R_21 is on a distinguished road
Hi Foamers,

I know this is a silly question but I would like to know how to write the following equation in Openfoam custom solver.



I have wrote the following line.

tmp<fvScalar> rhoCEqn
(
fvm::laplacian(epsilonR, rhoC)
== rhoC / (sqr(lamdaD) ;
);

where, epsilonR and lamdaD are constants

Regards,
Rafath
R_21 is offline   Reply With Quote

Old   May 18, 2015, 10:27
Smile
  #2
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
Hi,

You can do directly:

solve
(
fvm::laplacian(epsilonR, rhoC) - (rhoC / Foam::sqr(lamdaD))
);


and you must read your "lamdaD" value by defining it in your createFields.H file as the following:

dimensionedScalar lambaD
(
transportProperties.lookup("lamdaD")
);


then before lunching the simulation, you must provide the value of lamdaD in the case_Folder/constant/transportProperties
like : lamdaD lamdaD [ 0 ---- dimensions---- 0 ] its_value;

Have Fun !

T.D.

Quote:
Originally Posted by R_21 View Post
Hi Foamers,

I know this is a silly question but I would like to know how to write the following equation in Openfoam custom solver.



I have wrote the following line.

tmp<fvScalar> rhoCEqn
(
fvm::laplacian(epsilonR, rhoC)
== rhoC / (sqr(lamdaD) ;
);

where, epsilonR and lamdaD are constants

Regards,
Rafath
T.D. is offline   Reply With Quote

Old   May 19, 2015, 06:59
Default
  #3
New Member
 
rafath
Join Date: Jun 2014
Location: mumbai
Posts: 24
Rep Power: 11
R_21 is on a distinguished road
thanks a lot T.D .
R_21 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
Adding extra terms in governing equations Alek FLUENT 0 January 30, 2014 11:20
Error compiling solver controlling custom BC Gaetano OpenFOAM Programming & Development 2 January 22, 2014 07:48
Problem with run continue of a custom solver Hisham OpenFOAM Programming & Development 1 January 23, 2013 10:36
free " ordinary differential equations solver" ztdep Main CFD Forum 2 March 21, 2006 02:58


All times are GMT -4. The time now is 06:32.