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

Euler solver in BCs

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

Like Tree3Likes
  • 2 Post By cfdonline2mohsen
  • 1 Post By Hiroshiman

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2013, 09:35
Default Euler solver in BCs
  #1
Member
 
Join Date: Sep 2012
Posts: 51
Rep Power: 13
Hiroshiman is on a distinguished road
Hi,
I'm trying to implement a boundary conditions that links pressure to outflow using a differential equation (Windkessel) and therefore need to solve it. A simple 1st order backward Euler solver should be enough and, fortunately, one is available in OF.

I've never added a new BC but I tried a take an existing one, use the outflow on the selected patch to calculate the pressure and export it.

I was wondering : what it the best existing BC to start from ? Has anyone an example a the use of a solver in a BC function ?


Best regards,

Florian
Hiroshiman is offline   Reply With Quote

Old   August 8, 2013, 14:19
Default
  #2
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16
cfdonline2mohsen is on a distinguished road
Dear Hiroshiman

The following pdf by Håkan Nilsson in Chalmers University is so helpful.

How to implement a new boundary conditions:
http://www.tfd.chalmers.se/~hani/kur...yCondition.pdf

Also, take a look at his homepage for more tutorials:

http://www.tfd.chalmers.se/~hani/index.html
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/
Hiroshiman and ScarFace like this.
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.”
cfdonline2mohsen is offline   Reply With Quote

Old   August 8, 2013, 14:37
Default
  #3
Member
 
Join Date: Sep 2012
Posts: 51
Rep Power: 13
Hiroshiman is on a distinguished road
Hi Kia,
thank you for the links. Actually I've already read the Chalmers guide for the programmation of BCs.
Currently I'm using the codedFixedValue BC with a code that calculates p from phi on the outlet.
I still have a few problems : how can I access the mean value of the pressure on the patch ? I'm able to do it for phi but not for p (surfaceField vs volume Field).

Code:
const surfaceScalarField& phi = db().lookupObject<surfaceScalarField>("phi");
const fvsPatchField<scalar>& phip = patch().patchField<surfaceScalarField, scalar>(phi);
I must solve something like :
d(p-phi*R)/dt=f(p,phi) to impose p on the outlet, is it possible to use the ddt solver of openfoam ? I coded an Euler solver but I'd like to use a maximum of integrated functions...


Regards,

Florian
ScarFace likes this.
Hiroshiman is offline   Reply With Quote

Old   April 19, 2016, 06:58
Default
  #4
New Member
 
United Kingdom
Join Date: Jun 2014
Posts: 12
Rep Power: 11
Andreas2014 is on a distinguished road
Hi,

Hiroshiman, did you manage to get it to work?
Here is how you can access pressure.
Code:
const scalarField& press =
                patch().lookupPatchField<volScalarField, scalar>("pressure");
Did you have to solve the ode at every internal iteration in a timestep?

I am using resistance boundary conditions, where the pressure outlet is simply the product of a resistance value and the flowrate at the outlet.

I have coded it with codedFixedValue but am not getting the same results as those I find in Fluent.

Any pointers would be appreciated,

Kind regards,
Andreas
Andreas2014 is offline   Reply With Quote

Old   June 5, 2020, 07:43
Default
  #5
Neb
Member
 
Join Date: Mar 2020
Posts: 66
Rep Power: 6
Neb is on a distinguished road
HI, It's been a long time, but has anyone solved this problem? I should be doing the exact same thing.

Thanks!
Neb 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
3d vof Smaras FLUENT 2 February 19, 2013 07:58
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 12:34
[GAMBIT] BC's value assignment in Gambit Vs. Fluent (solver) hadikhayyamian ANSYS Meshing & Geometry 5 December 21, 2010 13:28
Getting too many iterations by velocity solving (aborting). Changing U - Solver? suitup OpenFOAM Running, Solving & CFD 0 January 20, 2010 08:45
compressible two phase flow in CFX4.4 youngan CFX 0 July 2, 2003 00:32


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