|
[Sponsors] |
February 18, 2022, 07:22 |
Nonlinear Equation
|
#1 |
New Member
Max
Join Date: Feb 2022
Posts: 8
Rep Power: 4 |
Hey,
I´m new to OpenFoam and would like to implement a nonlinear equation to my solver. Target Equation: C1 * (C2 + C3 * (C4 * |X0-X|)^0.1) * (X-X0) = 0 Where C1,C2,C3 are constant dimensionedScalars, X0 is my fixed reference volVectorField and X is the volVectorField I would like to calculate for each cell As you can see, I do not have any derivative to use fvm namespace or something else. Hence, following code does obviously not work: Code:
fvVectorMatrix XEqn ( C1 * (C2 + C3 * (C4 * |X0-X|)^0.1) * (X-X0) ); XEqn.solve(); Now my question: How can I solve equations like this with no derivative for each single cell. Is this possible? If yes are there multiple methods? Help is appreciated Max |
|
February 18, 2022, 07:49 |
|
#3 |
New Member
Max
Join Date: Feb 2022
Posts: 8
Rep Power: 4 |
Hey,
and thank you for the answer. My X0 is coupled over the whole mesh. What I would like to do is calculating my X without any coupling meaning I can also calculate it for each cell with a loop as you said, but how? Tanks you Max |
|
February 18, 2022, 11:21 |
|
#4 |
Senior Member
|
You can put a root finding algorithm inside a loop over cells.
To implement loop over cells, see e.g. https://github.com/UnnamedMoose/Basi...mmingTutorials A root finding algorithm can be found inside the boost libraries, see e.g. https://www.boost.org/doc/libs/1_64_...kit/roots.html. OpenFoam builds upon boost. Possible you can try to develop a boost solver outside of OpenFoam. |
|
August 21, 2023, 03:07 |
nonlinear spring stiffness
|
#5 |
New Member
shristi
Join Date: Jun 2023
Posts: 26
Rep Power: 3 |
I want to use non-linear spring stiffness to solve motion equations in openFoam. can anyone tell me how I can do that?
|
|
August 21, 2023, 06:50 |
|
#6 |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16 |
please elaborate your question,
provide background and formula of interest would definitely help. |
|
August 21, 2023, 06:52 |
|
#7 |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16 |
||
August 21, 2023, 07:25 |
non- linear equation
|
#8 |
New Member
shristi
Join Date: Jun 2023
Posts: 26
Rep Power: 3 |
First of all, Thank you sir for your response.....
sir, I am working on energy harvesting from vortex-induced vibration in which I use non-linear spring stiffness instead of linear stiffness in the spring mass damper system using OpenFOAM software. my ̈ + Cy ̇ + ky +by^3= Fy I am not able to introduce nonlinearity in the motion equation in openFoam and also I am not able to find any video or tutorials related to this. I have done simulations with linear systems for isolated and multi-body but have not been able to do with non-linear systems. |
|
August 22, 2023, 01:28 |
|
#9 | |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16 |
Quote:
|
||
Tags |
nonlinear equation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can temperature e treated as a passive scalar be used in transport equation? | granzer | OpenFOAM Running, Solving & CFD | 3 | June 6, 2021 17:35 |
Derivation of the Temperature Equation | Tobi | OpenFOAM Programming & Development | 21 | April 10, 2018 23:15 |
How to solve nonlinear equation. | BoredKoala | OpenFOAM Programming & Development | 14 | October 3, 2016 13:19 |
How to? Extra term in k-e equation. Implicit-Explicit | be_inspired | OpenFOAM Programming & Development | 1 | March 19, 2013 11:50 |
Diffusion Equation | izardy amiruddin | Main CFD Forum | 2 | July 4, 2002 09:14 |