|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Nishanth Murugan
Join Date: Dec 2017
Location: India
Posts: 9
Rep Power: 8 ![]() |
Hey guys,
I'm working on acoustics and I've simplified my P.D.E into two ODE's. I need to solve them simultaneously over a 2-D domain. One of the ODE's corresponds to the acoustics in the "x" and the other in the y-direction. I've looked at the Test-ODE.C file in the openfoam5/applications/test/ODE folder. Can anyone point out how I can proceed further with applying this ODE solver that I've modified to a 2-D domain subject to B.C's Thank you in advance. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Sebastian
Join Date: Feb 2017
Posts: 22
Rep Power: 9 ![]() |
Hello,
I am not sure, if you really have an ODE or if it is more likely that you have an uncoupled system of PDEs since your are talking about boundary conditions and it seems that you once have a x and once a y derivative. (Each of this PDEs might be an ODE, however you can not write is as a system of ODEs). Is your quantity of interest a scalar or a vector? However, it would be more clear, if you would provide us some equations. Looking to the test case, it seems that a similar notation for providing the ODE as in Matlab is used. One writes the equations in form of a system x' = f(x) and specifies every equation in one line. Additionally, one provides the Jacobian. I guess some kind of Newton method is used to solve the system of ODEs. Regards Sebastian |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Nishanth Murugan
Join Date: Dec 2017
Location: India
Posts: 9
Rep Power: 8 ![]() |
Hey Sebastian,
Thanks for your reply. Yes, my system of two ODE's is actually an uncoupled PDE. I need to solve the Helmholtz Equation in the Transverse Plane (y-z plane) and a 2nd Order ODE along the x-direction. I am able to solve the two equations separately. How do I go about writing a solver for the two so that it can be solved over any domain or geometry subject to B.C's? Thanks in advance. ![]() |
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Sebastian
Join Date: Feb 2017
Posts: 22
Rep Power: 9 ![]() |
Hi,
thank you for your further explanations. If you are able to solve both equations separately in openFoam then it should be possible to build a new solver by combining the source codes of the two solvers into one file. This might sound easy, however you have to take care that everything is done consistently. Concerning the boundary conditions I guess it depends how you want to incorporate them in the model. Since you write that you have a 2nd order ODE, I assume that it is not a typical initial value problem (as it is tackled in Test-ODE) but a boundary value problem where you describe the values at both ends of the domain. Therefore I would not go with a classical ODE solver and consider it as a system of ODEs (since you are missing an initial condition for the derivative), however I would consider it as a PDE. For one equation (in x-direction) you want the Laplace operator only to act in a specific direction, right? Why not to modify the Laplace operator to do that. Maybe you have a look at this thread (Modifying the laplacian operator) where, I guess, something similar is done. Regards Sebastian |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Nishanth Murugan
Join Date: Dec 2017
Location: India
Posts: 9
Rep Power: 8 ![]() |
True, my ODE is a BVP and not an IVP. However, I'm using the Shooting Method in which a BVP may be solved using an IVP Solver.
Thank's for that link to the other thread. It was useful. Yes, Linking the B.C's to the solver is going to be troublesome, as I'm relatively new to OF. |
|
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Sebastian
Join Date: Feb 2017
Posts: 22
Rep Power: 9 ![]() |
If you are using the shooting method, then in any case you have to wrap something around the ODE-solver of openFOAM. Also for taking care of the boundary conditions. In
HTML Code:
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2008/ZongyuanGu/reportZongyuan.pdf However, since you might have to write your equation for every computation point by hand, I still do not know, if using a classical ODE-Solver is the best way to solve your problem. |
|
![]() |
![]() |
![]() |
Tags |
ode solver, openfoam 5.0 |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] Help with element size | sandri_92 | ANSYS Meshing & Geometry | 14 | November 14, 2018 07:54 |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 05:57 |
Cluster ID's not contiguous in compute-nodes domain. ??? | Shogan | FLUENT | 1 | May 28, 2014 15:03 |
If OpenFOAM can run different solver in different domain in the same time ? | panda60 | OpenFOAM Running, Solving & CFD | 4 | May 15, 2014 10:07 |
Floating point exception: Zero divide | liladhar | CFX | 11 | December 16, 2013 04:07 |