CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   implementation of schemes in openfoam (https://www.cfd-online.com/Forums/openfoam/89510-implementation-schemes-openfoam.html)

venkataramana June 15, 2011 00:22

implementation of schemes in openfoam
 
dear all,
i have one question, what is the procedure to make customised schemes in openFoam i mean other than existing schemes in openfoam. i need to implement the schemes like upwind.

thanks in advance

with regards
venkataramana

Bernhard June 15, 2011 02:16

Upwind schemes are implemented a long, long time ago, see here how to use them: http://www.openfoam.com/docs/user/fvSchemes.php

venkataramana June 15, 2011 02:33

what i mean to say the schemes other than upwind, linear which are available in openFoam, How to develop a new scheme and how to run it.

thanks for your reply,

Bernhard June 15, 2011 03:21

I would it something like this: Start from an existing scheme that looks like the one you are looking for, copy them in your own folder, adjust to your wishes, compile into a library, and call that using controlDict from your simulation.

venkataramana June 15, 2011 05:38

thank u very much, i will try it

vatavuk June 15, 2011 09:20

Hi Bernard,
I have a doubt similar to Venkataramana's. Which file I have to edit to modify the van Leer scheme?
Thanks,
Paulo Vatavuk

akidess June 15, 2011 09:37

See vanLeer.H

vatavuk June 16, 2011 09:18

Hi Anton,
Thanks for the hint. I’ve been navigating the code documentation for almost one hour, but I can’t find the point were the vanLeerLimiter class is instantiated. I want to understand were the LimitedScheme parameter is defined. I’ve been studying C++ for some time but I’m still thinking in the FORTRAN way. Can you help me?
Thanks,
Paulo

akidess June 21, 2011 02:37

It's a bit tough to find where it is instantiated because the trail breaks due to the use of macros. If you just want to implement a different limiter, just stick to vanLeer.H (updated link) and edit the limiter function there.

venkataramana June 21, 2011 05:01

hi,
 
Quote:

Originally Posted by Bernhard (Post 312062)
I would it something like this: Start from an existing scheme that looks like the one you are looking for, copy them in your own folder, adjust to your wishes, compile into a library, and call that using controlDict from your simulation.

where should i call in controlDict file..

vatavuk June 21, 2011 06:01

Hi Anton,
Thanks for the help.
Paulo

venkataramana June 21, 2011 06:25

hi vatavuk,
 
can u write a procedure, to edit any scheme with steps in openFoam. i need to edit Gauss linear scheme.

thank u,

vatavuk June 22, 2011 15:11

Hi Venkataramana,
I'm still trying to figure out how to do it. I suspect that creating a new scheme is more or less like creating a new boundary condition or a new turbulence model, because they all are runtime selectable. I found a programming tutorial that may help:
http://cfd.iut.ac.ir/files/Tutorial,...20Diego%20.pdf
Best wishes,
Paulo

vatavuk June 22, 2011 15:12

Sorry I dupplicated the above post and I don't know how to remove it.

nsreddysrsit November 10, 2011 03:16

schemes
 
Dear all openfoam users,

where exactly the code for the following upwind scheme is available in openfoam,

http://s0.wp.com/latex.php?latex=%5C...&fg=333333&s=0.
if i want to edit the linear upwind scheme in to 2 nd order and 3rd order and how to implement it ( I mean procedure)
anybody implemented any schemes in open Foam.
Thanks in advance.

Anne Lincke January 9, 2014 04:40

Dear foamers,

it has been a while since this post has been made. But I am still facing the same question. Where exactly can be found the implementation of the upwind scheme, or higher order convection schemes (deferred correction, k-scheme) in OpenFOAM?

See also this thread that I opened.

http://www.cfd-online.com/Forums/ope...on-scheme.html

Thank you very much for your answers!
Anne

pablitobass February 21, 2015 20:34

Quote:

Originally Posted by Anne Lincke (Post 469238)
Dear foamers,

it has been a while since this post has been made. But I am still facing the same question. Where exactly can be found the implementation of the upwind scheme, or higher order convection schemes (deferred correction, k-scheme) in OpenFOAM?

Anne

Hi Anne,

I am facing the same problem. Basically I would like to modify an existing scheme but I could not find where the scheme is defined. By following this path:

src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes

I found the "interpolation_scheme".H files, but I am afraid that they are related to the limiter of that "interpolation_scheme".

Did you sort out the problem, by any chance?

Cheers!
Paolo

Tushar@cfd February 21, 2015 23:40

Quote:

Originally Posted by pablitobass (Post 532817)
Hi Anne,

I am facing the same problem. Basically I would like to modify an existing scheme but I could not find where the scheme is defined. By following this path:

src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes

I found the "interpolation_scheme".H files, but I am afraid that they are related to the limiter of that "interpolation_scheme".

Did you sort out the problem, by any chance?

Cheers!
Paolo

Dear Paolo,

I don't know it will be of any use to you but I think you should refer the following cfd-online post:

http://www.cfd-online.com/Forums/ope...tml#post348575

-
Best Luck!

Andrew_Sm February 22, 2015 00:18

Greetings to all!

@Tushar & Paolo
It is because of NDA (https://en.wikipedia.org/wiki/Non-disclosure_agreement). Detailed information of OpenFOAM comes under NDA

Check this out
http://www.cfd-online.com/Forums/ope...tml#post531559

:)

pablitobass February 22, 2015 07:23

@Tushar
Thank you very much for your reply. I have already had a look on th e post you suggested me but I couldn't find a solution to my problem.

@Andrew
Thanks to you too. I have also seen the post you suggested about the NDA and I think I am in a different situation. In that post they were talking about a particular case posted by the thread starter. If the case is under NDA, you cannot share information about your results whit other people. In my case I have just asked Anne if she had sorted out her problem and asked where I could find the OpenFOAM file I would like to modify.


Cheers to you All!
Paolo

Andrew_Sm February 22, 2015 22:52

@Paolo
Its up to you to accept the facts or ignore

All I can say..
Good Luck

pablitobass February 23, 2015 07:09

Hi Andrew,

I just thought that in principle it is possible to modify everything in OpenFOAM. I do not know, maybe I am wrong.
Anyway, many thanks for the advice!

Cheers,
Paolo

Anne Lincke February 24, 2015 06:03

Dear Paolo,

it has been a while since I dealt with this problem. Here, what I found out a while ago for the LUDS scheme

The weights for the surface interpolation are computed in the method linearUpwind.C
and used in the method surfaceInterpolationSchemes.C in
src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme

In linearUpwind.C the method upwind.H is called from
src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind In upwind.H the weights are computed according to the UDS scheme, setting  = 1 if the flux is greater
than zero and  = 0 else.

The explicit correction via the gradient
is added in the method linearUpwind.C in
src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind

I hope this helps?

Kind Regards
Anne

pablitobass March 5, 2015 19:27

Hi Anne,

Thank you very much for your answer, for your time, and sorry for the belated reply.

Your reply helped me a lot. However, I am still trying to understand how to get the scheme I want, but seems that it will be as much harder as expected. At least, by considering what you said, now it seems that it would be possible... I just need time to understand the structure of the software.

Thanks once again!

Kind Regards,
Paolo

gouravjee February 21, 2018 11:09

laplacian scheme
 
can anyone suggest which one scheme is to be choosed in case of enthalpy updating method for phase change material.


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