Help solving a nonlinear function

조회 수: 1 (최근 30일)
Hunter Watts
Hunter Watts 2021년 7월 19일
댓글: Hunter Watts 2021년 7월 19일
Hi,
I am currently working on a project where I am trying to code and plot a function in the form of (F1 * S1) + (F2 * S2) + (F3 * S1^2) + (F22 * S2^2) + (2 *F12 * S1 * S2) =>1 where S1 and S2 are known and F1,F2,F3,F22, and F12 are equations that vary in a loop.
If you are familiar with the Tsai Wu failure criterion, that is what I am trying to code to produce the tension and compression values.
I feel like I have gone down a PHD rabbit hole and was trying to see if maybe I was going about it wrong.
My current strategy is to use syms for the variables I am trying to solve for in the "F" equations, then solve the equation, use all the solved equations to solve for the unkowns, then substitute back into the original equation.
The code is extremly sloppy and I am prepared to start over. It currently does not run, although I have gotten it to graph under certain circumstances. I would rather not post my code, just looking for ideas on how to solve the problem.
  댓글 수: 2
Walter Roberson
Walter Roberson 2021년 7월 19일
What variable(s) are being solved for? Is F1,F2,F3,F22, and F12 a set of 5 equations in at least 5 unknowns? I am not clear as to what unknowns are left after you solve those 5 equations?
Is it the case that you originally had more than 5 equations, but reduced them down to 5 equations in 5 unknowns, which you solve for, and then go to back-substitute to get the full set of values?
Hunter Watts
Hunter Watts 2021년 7월 19일
These are the specific equations. In my original question, F3 is the same as F11 this photo. Also I have disregared the F66 and S6^2 as it is always zero for my use case.
The variables I am trying to graph are actually the sigma_T_1, sigma_C_1, sigma_T_2, and sigma_C_2 from 0 to 360. I was able to get a semi funtional graph (graph was correct up untill 180) with correct values before I left school today. So I belive I am on the right track.
A bit of context for what is going on if it helps. I do research on composites for spacecraft at my university and this is a program that helps calculate the faliure of composites based on ply angles (0,45,90, as well as experimental ones) as well as fiber and matrix material.
Thanks for your help!

댓글을 달려면 로그인하십시오.

답변 (1개)

John D'Errico
John D'Errico 2021년 7월 19일
I don't know what it means when you call something an equation that varies in a loop. This is certainly not a PHD level rabbit hole. It does sound as if you are beyond your comfortable depth in the deep end of the pool though.
You have two unknowns. You want to find the locus of points where that inequality is satisfied. If the coefficients were constant, then what you have is a simple conic section. An issue is, depending on those coefficients a conic section can describe anything from a circle, to an elliptical region to a hyperbola or parabola. (Again, not doctoral level, more like high school algebra at that point.)
As a function of what the coefficients are, there is a simple set of rules to determine which conic sectrion applies. So while I don't know what you are trying to say about an equation that varies in a loop, at any iteration in that loop, those parameters are not a function of S1 and S2. And that means, at that point, you have a simple conic section. So plot it, and the set of points that fall on the desired side of the section.
The thing is, what you need to do is break this down into a set of SMALL problems. And that is how you should ALWAYS solve any problem that is too complicated for you to solve. Thus, given the set of CONSTANT coefficients, you can write a simple code that will plot the locus of points that satisfy your inequality. Then worry about how those coefficients will vary in a "loop".
I really cannot say much more than this. This seems to be, on the face of things, a moderately simple problem. Just break it down into smaller problems that you can see how to solve.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by