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

Add a source term into a openfoam Solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 14, 2015, 17:50
Cool Add a source term into a openfoam Solver
  #1
Member
 
methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 40
Rep Power: 10
meth is on a distinguished road
Hi,

I am going to use a non inertial reference frame for the fluid. In that case I have to add the acceleration of the frame into the Navier Stokes equations. Acceleration is uniform across the fluid and time varying. I am going to threat it as a force term. I know how to updates the boundary condition, but I don't know how to update the internal field. Can you please give your ideas and references.

Thank you

Methma
meth is offline   Reply With Quote

Old   November 15, 2015, 18:58
Smile
  #2
Member
 
methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 40
Rep Power: 10
meth is on a distinguished road
Actually I could do it.

The acceleration of the frame was defined as a field variable "ddy", I gave fixed value boundary condition for all boundaries. I updated the internal field by

Code:
          ddy =  dimensionedVector("myddy", dimAcceleration, vector(0,sddy,0));
where "sddy" is the acceleration on y direction calculated inside the solver in each time step. Boundary conditions are also updated with vector(0,sddy,0).

best,

Methma
meth is offline   Reply With Quote

Old   September 29, 2016, 20:27
Default
  #3
New Member
 
金恒
Join Date: Oct 2012
Posts: 17
Rep Power: 13
jinheng is on a distinguished road
Quote:
Originally Posted by meth View Post
Hi,

I am going to use a non inertial reference frame for the fluid. In that case I have to add the acceleration of the frame into the Navier Stokes equations. Acceleration is uniform across the fluid and time varying. I am going to threat it as a force term. I know how to updates the boundary condition, but I don't know how to update the internal field. Can you please give your ideas and references.

Thank you

Methma
hi meth,
i see you have solved your problem. I also want to add a acceleration into NS equation. But without any experience. Actually, I wanna use a horizontal acceleration replace moving dynamic mesh to excite fluid movement in a tank. Do you have any advise about that ? thx
jinheng
jinheng 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
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 17:18
How to add this term to openfoam solver rapierrz OpenFOAM Programming & Development 10 February 28, 2015 12:30
Source term in OpenFOAM: fvc vs fvm Sylv OpenFOAM Programming & Development 0 November 20, 2014 06:39
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04


All times are GMT -4. The time now is 14:23.