Solving nonlinear 1D advection pde with MoC












2












$begingroup$


I would like to solve the 1D nonlinear advection equation with the method of characteristics. Here is my notation:



begin{equation}
begin{cases}
rho_t + (1+rho)rho_x = 0\
rho = rho(x,t); quad rho(x,0) = frac{1}{1+x^2}
end{cases}
end{equation}

What I have been up to is the following, using the parameter s:
begin{align}
&frac{drho}{dt} = frac{dx}{ds}frac{partial rho}{partial x} + frac{dt}{ds}frac{partial rho}{partial t} = 0\
Longrightarrow ; & frac{dt}{ds} = 1 ;quad t(0)=0 ; Longrightarrow ; t=s \
Longrightarrow ; & frac{drho}{ds} = 0 ;quad rho(0)=rho_0 ; Longrightarrow ; rho = rho_0 \
Longrightarrow ; & frac{dx}{ds}=1+rho= 1+rho_0 ;quad x(0) = f(rho_0) ; Longrightarrow ; x = (1+rho_0)s + f(rho_0)
end{align}

So that I end up with
begin{equation}
f(rho) = x - (1+rho)t ; Longrightarrow ; rho = F(x - [1+rho]t )
end{equation}

I tried to apply several techniques I found to find the solution of the above Riemann problem using the method of characteristics. I have the general form of the solution as F but I would like to have the analytic solution for this case so I can plot for several times and see the shockwave.



Note: This problem comes from this online document, chapter 11.










share|cite|improve this question









$endgroup$












  • $begingroup$
    You must provide a condition on the "inflow" boundary, for instance $rho(0,t)=1$. If you just want to visualize the solution I can provide two lines of Wolfram code that will do the trick.
    $endgroup$
    – PierreCarre
    Jan 31 at 9:43










  • $begingroup$
    I think you haven't used the initial condition on $rho$ yet, which yields $rho_0 = frac{1}{1+f(rho_0)^2}$?
    $endgroup$
    – Christoph
    Jan 31 at 9:54










  • $begingroup$
    As J.Jacquelin did below, using the unitial condition on $rho$ leads to a cubic equation that I have no idea how to solve.
    $endgroup$
    – Dash
    Jan 31 at 14:48
















2












$begingroup$


I would like to solve the 1D nonlinear advection equation with the method of characteristics. Here is my notation:



begin{equation}
begin{cases}
rho_t + (1+rho)rho_x = 0\
rho = rho(x,t); quad rho(x,0) = frac{1}{1+x^2}
end{cases}
end{equation}

What I have been up to is the following, using the parameter s:
begin{align}
&frac{drho}{dt} = frac{dx}{ds}frac{partial rho}{partial x} + frac{dt}{ds}frac{partial rho}{partial t} = 0\
Longrightarrow ; & frac{dt}{ds} = 1 ;quad t(0)=0 ; Longrightarrow ; t=s \
Longrightarrow ; & frac{drho}{ds} = 0 ;quad rho(0)=rho_0 ; Longrightarrow ; rho = rho_0 \
Longrightarrow ; & frac{dx}{ds}=1+rho= 1+rho_0 ;quad x(0) = f(rho_0) ; Longrightarrow ; x = (1+rho_0)s + f(rho_0)
end{align}

So that I end up with
begin{equation}
f(rho) = x - (1+rho)t ; Longrightarrow ; rho = F(x - [1+rho]t )
end{equation}

I tried to apply several techniques I found to find the solution of the above Riemann problem using the method of characteristics. I have the general form of the solution as F but I would like to have the analytic solution for this case so I can plot for several times and see the shockwave.



Note: This problem comes from this online document, chapter 11.










share|cite|improve this question









$endgroup$












  • $begingroup$
    You must provide a condition on the "inflow" boundary, for instance $rho(0,t)=1$. If you just want to visualize the solution I can provide two lines of Wolfram code that will do the trick.
    $endgroup$
    – PierreCarre
    Jan 31 at 9:43










  • $begingroup$
    I think you haven't used the initial condition on $rho$ yet, which yields $rho_0 = frac{1}{1+f(rho_0)^2}$?
    $endgroup$
    – Christoph
    Jan 31 at 9:54










  • $begingroup$
    As J.Jacquelin did below, using the unitial condition on $rho$ leads to a cubic equation that I have no idea how to solve.
    $endgroup$
    – Dash
    Jan 31 at 14:48














2












2








2





$begingroup$


I would like to solve the 1D nonlinear advection equation with the method of characteristics. Here is my notation:



begin{equation}
begin{cases}
rho_t + (1+rho)rho_x = 0\
rho = rho(x,t); quad rho(x,0) = frac{1}{1+x^2}
end{cases}
end{equation}

What I have been up to is the following, using the parameter s:
begin{align}
&frac{drho}{dt} = frac{dx}{ds}frac{partial rho}{partial x} + frac{dt}{ds}frac{partial rho}{partial t} = 0\
Longrightarrow ; & frac{dt}{ds} = 1 ;quad t(0)=0 ; Longrightarrow ; t=s \
Longrightarrow ; & frac{drho}{ds} = 0 ;quad rho(0)=rho_0 ; Longrightarrow ; rho = rho_0 \
Longrightarrow ; & frac{dx}{ds}=1+rho= 1+rho_0 ;quad x(0) = f(rho_0) ; Longrightarrow ; x = (1+rho_0)s + f(rho_0)
end{align}

So that I end up with
begin{equation}
f(rho) = x - (1+rho)t ; Longrightarrow ; rho = F(x - [1+rho]t )
end{equation}

I tried to apply several techniques I found to find the solution of the above Riemann problem using the method of characteristics. I have the general form of the solution as F but I would like to have the analytic solution for this case so I can plot for several times and see the shockwave.



Note: This problem comes from this online document, chapter 11.










share|cite|improve this question









$endgroup$




I would like to solve the 1D nonlinear advection equation with the method of characteristics. Here is my notation:



begin{equation}
begin{cases}
rho_t + (1+rho)rho_x = 0\
rho = rho(x,t); quad rho(x,0) = frac{1}{1+x^2}
end{cases}
end{equation}

What I have been up to is the following, using the parameter s:
begin{align}
&frac{drho}{dt} = frac{dx}{ds}frac{partial rho}{partial x} + frac{dt}{ds}frac{partial rho}{partial t} = 0\
Longrightarrow ; & frac{dt}{ds} = 1 ;quad t(0)=0 ; Longrightarrow ; t=s \
Longrightarrow ; & frac{drho}{ds} = 0 ;quad rho(0)=rho_0 ; Longrightarrow ; rho = rho_0 \
Longrightarrow ; & frac{dx}{ds}=1+rho= 1+rho_0 ;quad x(0) = f(rho_0) ; Longrightarrow ; x = (1+rho_0)s + f(rho_0)
end{align}

So that I end up with
begin{equation}
f(rho) = x - (1+rho)t ; Longrightarrow ; rho = F(x - [1+rho]t )
end{equation}

I tried to apply several techniques I found to find the solution of the above Riemann problem using the method of characteristics. I have the general form of the solution as F but I would like to have the analytic solution for this case so I can plot for several times and see the shockwave.



Note: This problem comes from this online document, chapter 11.







pde nonlinear-system characteristics






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 31 at 8:57









DashDash

111




111












  • $begingroup$
    You must provide a condition on the "inflow" boundary, for instance $rho(0,t)=1$. If you just want to visualize the solution I can provide two lines of Wolfram code that will do the trick.
    $endgroup$
    – PierreCarre
    Jan 31 at 9:43










  • $begingroup$
    I think you haven't used the initial condition on $rho$ yet, which yields $rho_0 = frac{1}{1+f(rho_0)^2}$?
    $endgroup$
    – Christoph
    Jan 31 at 9:54










  • $begingroup$
    As J.Jacquelin did below, using the unitial condition on $rho$ leads to a cubic equation that I have no idea how to solve.
    $endgroup$
    – Dash
    Jan 31 at 14:48


















  • $begingroup$
    You must provide a condition on the "inflow" boundary, for instance $rho(0,t)=1$. If you just want to visualize the solution I can provide two lines of Wolfram code that will do the trick.
    $endgroup$
    – PierreCarre
    Jan 31 at 9:43










  • $begingroup$
    I think you haven't used the initial condition on $rho$ yet, which yields $rho_0 = frac{1}{1+f(rho_0)^2}$?
    $endgroup$
    – Christoph
    Jan 31 at 9:54










  • $begingroup$
    As J.Jacquelin did below, using the unitial condition on $rho$ leads to a cubic equation that I have no idea how to solve.
    $endgroup$
    – Dash
    Jan 31 at 14:48
















$begingroup$
You must provide a condition on the "inflow" boundary, for instance $rho(0,t)=1$. If you just want to visualize the solution I can provide two lines of Wolfram code that will do the trick.
$endgroup$
– PierreCarre
Jan 31 at 9:43




$begingroup$
You must provide a condition on the "inflow" boundary, for instance $rho(0,t)=1$. If you just want to visualize the solution I can provide two lines of Wolfram code that will do the trick.
$endgroup$
– PierreCarre
Jan 31 at 9:43












$begingroup$
I think you haven't used the initial condition on $rho$ yet, which yields $rho_0 = frac{1}{1+f(rho_0)^2}$?
$endgroup$
– Christoph
Jan 31 at 9:54




$begingroup$
I think you haven't used the initial condition on $rho$ yet, which yields $rho_0 = frac{1}{1+f(rho_0)^2}$?
$endgroup$
– Christoph
Jan 31 at 9:54












$begingroup$
As J.Jacquelin did below, using the unitial condition on $rho$ leads to a cubic equation that I have no idea how to solve.
$endgroup$
– Dash
Jan 31 at 14:48




$begingroup$
As J.Jacquelin did below, using the unitial condition on $rho$ leads to a cubic equation that I have no idea how to solve.
$endgroup$
– Dash
Jan 31 at 14:48










1 Answer
1






active

oldest

votes


















1












$begingroup$

Your calculus is correct. You found the general solution :
$$rho=Fleft(x-(1+rho)tright)$$
Condition :
$$rho(x,0)=frac{1}{1+x^2}=Fleft(x-(1+rho)0right)=Fleft(xright)$$
The function $F$ is determined :
$$F(X)=frac{1}{1+X^2}$$
We put this function into the general solution where $X=x-(1+rho)t$
$$rho=frac{1}{1+(x-(1+rho)t)^2}$$
This is the solution on implicit form.



In order to obtain the explicit solution, solve the cubic equation for $rho$ :
$$(1+(x-(1+rho)t)^2)rho-1=0$$



ADITION after the discussion in comments.



There is no difficulty to plot the figures that you saw in the document :
https://courses.physics.ucsd.edu/2011/Spring/physics221a/LECTURES/CH11_SHOCKS.pdf



For exemple, to plot the curves corresponding tu figure 11.1 :
$$x=(1+rho)tpmsqrt{frac{1}{rho}-1}$$
Plot the two branches with signs $+$ and $-$.



enter image description here



Inverse the axis if you want it in the standard position.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Thamks for answering. I actually came to the same conclusion a few minutes ago. My next problem is when I'm computing the $delta = b^2 - 4ac$ of this equation, which sign is undetermined because, well, in (x,t) parameters are supposed to be both varying parameters and though $delta$ is not a scalar but a space of solutions.
    $endgroup$
    – Dash
    Jan 31 at 14:26












  • $begingroup$
    Apologies, I had a slightly different in mind indeed.. Still you are right, the formula cannot be written explicitly. Why I would like to have a explicit formula is to plot the solution for several time step to compare with what is shown in the book I mentionned. Another contributor kindly proposed a Wolfram code to do that but I wanted to do it on gnuplot or python. You know, the old way..
    $endgroup$
    – Dash
    Jan 31 at 15:08










  • $begingroup$
    There is no need for an explicit formula to plot $rho(x,t)$ as a function of $t$ for given $x$. Compute the formula of $t$ as a function of $rho$ which is an explicit equation. Plot $t$ as a function of $rho$ with $t$ on horizontal axis and $rho$ on vertical axis.
    $endgroup$
    – JJacquelin
    Jan 31 at 15:25












  • $begingroup$
    If I rewrite the equation as begin{equation} frac{1}{rho}-1=[x−(1+ρ)t]^2 end{equation} Then I cannot isolate t from ρ because of the square
    $endgroup$
    – Dash
    Jan 31 at 17:02












  • $begingroup$
    Here the advection velocity depends on $rho$ itself, which is the problem when I look for an explicit analytic solution. Perhaps I should quit looking for a beautiful formula, but do you have an idea of how they did in fig. 11 of the book to plot the solution ?
    $endgroup$
    – Dash
    Jan 31 at 18:55












Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3094666%2fsolving-nonlinear-1d-advection-pde-with-moc%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

Your calculus is correct. You found the general solution :
$$rho=Fleft(x-(1+rho)tright)$$
Condition :
$$rho(x,0)=frac{1}{1+x^2}=Fleft(x-(1+rho)0right)=Fleft(xright)$$
The function $F$ is determined :
$$F(X)=frac{1}{1+X^2}$$
We put this function into the general solution where $X=x-(1+rho)t$
$$rho=frac{1}{1+(x-(1+rho)t)^2}$$
This is the solution on implicit form.



In order to obtain the explicit solution, solve the cubic equation for $rho$ :
$$(1+(x-(1+rho)t)^2)rho-1=0$$



ADITION after the discussion in comments.



There is no difficulty to plot the figures that you saw in the document :
https://courses.physics.ucsd.edu/2011/Spring/physics221a/LECTURES/CH11_SHOCKS.pdf



For exemple, to plot the curves corresponding tu figure 11.1 :
$$x=(1+rho)tpmsqrt{frac{1}{rho}-1}$$
Plot the two branches with signs $+$ and $-$.



enter image description here



Inverse the axis if you want it in the standard position.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Thamks for answering. I actually came to the same conclusion a few minutes ago. My next problem is when I'm computing the $delta = b^2 - 4ac$ of this equation, which sign is undetermined because, well, in (x,t) parameters are supposed to be both varying parameters and though $delta$ is not a scalar but a space of solutions.
    $endgroup$
    – Dash
    Jan 31 at 14:26












  • $begingroup$
    Apologies, I had a slightly different in mind indeed.. Still you are right, the formula cannot be written explicitly. Why I would like to have a explicit formula is to plot the solution for several time step to compare with what is shown in the book I mentionned. Another contributor kindly proposed a Wolfram code to do that but I wanted to do it on gnuplot or python. You know, the old way..
    $endgroup$
    – Dash
    Jan 31 at 15:08










  • $begingroup$
    There is no need for an explicit formula to plot $rho(x,t)$ as a function of $t$ for given $x$. Compute the formula of $t$ as a function of $rho$ which is an explicit equation. Plot $t$ as a function of $rho$ with $t$ on horizontal axis and $rho$ on vertical axis.
    $endgroup$
    – JJacquelin
    Jan 31 at 15:25












  • $begingroup$
    If I rewrite the equation as begin{equation} frac{1}{rho}-1=[x−(1+ρ)t]^2 end{equation} Then I cannot isolate t from ρ because of the square
    $endgroup$
    – Dash
    Jan 31 at 17:02












  • $begingroup$
    Here the advection velocity depends on $rho$ itself, which is the problem when I look for an explicit analytic solution. Perhaps I should quit looking for a beautiful formula, but do you have an idea of how they did in fig. 11 of the book to plot the solution ?
    $endgroup$
    – Dash
    Jan 31 at 18:55
















1












$begingroup$

Your calculus is correct. You found the general solution :
$$rho=Fleft(x-(1+rho)tright)$$
Condition :
$$rho(x,0)=frac{1}{1+x^2}=Fleft(x-(1+rho)0right)=Fleft(xright)$$
The function $F$ is determined :
$$F(X)=frac{1}{1+X^2}$$
We put this function into the general solution where $X=x-(1+rho)t$
$$rho=frac{1}{1+(x-(1+rho)t)^2}$$
This is the solution on implicit form.



In order to obtain the explicit solution, solve the cubic equation for $rho$ :
$$(1+(x-(1+rho)t)^2)rho-1=0$$



ADITION after the discussion in comments.



There is no difficulty to plot the figures that you saw in the document :
https://courses.physics.ucsd.edu/2011/Spring/physics221a/LECTURES/CH11_SHOCKS.pdf



For exemple, to plot the curves corresponding tu figure 11.1 :
$$x=(1+rho)tpmsqrt{frac{1}{rho}-1}$$
Plot the two branches with signs $+$ and $-$.



enter image description here



Inverse the axis if you want it in the standard position.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Thamks for answering. I actually came to the same conclusion a few minutes ago. My next problem is when I'm computing the $delta = b^2 - 4ac$ of this equation, which sign is undetermined because, well, in (x,t) parameters are supposed to be both varying parameters and though $delta$ is not a scalar but a space of solutions.
    $endgroup$
    – Dash
    Jan 31 at 14:26












  • $begingroup$
    Apologies, I had a slightly different in mind indeed.. Still you are right, the formula cannot be written explicitly. Why I would like to have a explicit formula is to plot the solution for several time step to compare with what is shown in the book I mentionned. Another contributor kindly proposed a Wolfram code to do that but I wanted to do it on gnuplot or python. You know, the old way..
    $endgroup$
    – Dash
    Jan 31 at 15:08










  • $begingroup$
    There is no need for an explicit formula to plot $rho(x,t)$ as a function of $t$ for given $x$. Compute the formula of $t$ as a function of $rho$ which is an explicit equation. Plot $t$ as a function of $rho$ with $t$ on horizontal axis and $rho$ on vertical axis.
    $endgroup$
    – JJacquelin
    Jan 31 at 15:25












  • $begingroup$
    If I rewrite the equation as begin{equation} frac{1}{rho}-1=[x−(1+ρ)t]^2 end{equation} Then I cannot isolate t from ρ because of the square
    $endgroup$
    – Dash
    Jan 31 at 17:02












  • $begingroup$
    Here the advection velocity depends on $rho$ itself, which is the problem when I look for an explicit analytic solution. Perhaps I should quit looking for a beautiful formula, but do you have an idea of how they did in fig. 11 of the book to plot the solution ?
    $endgroup$
    – Dash
    Jan 31 at 18:55














1












1








1





$begingroup$

Your calculus is correct. You found the general solution :
$$rho=Fleft(x-(1+rho)tright)$$
Condition :
$$rho(x,0)=frac{1}{1+x^2}=Fleft(x-(1+rho)0right)=Fleft(xright)$$
The function $F$ is determined :
$$F(X)=frac{1}{1+X^2}$$
We put this function into the general solution where $X=x-(1+rho)t$
$$rho=frac{1}{1+(x-(1+rho)t)^2}$$
This is the solution on implicit form.



In order to obtain the explicit solution, solve the cubic equation for $rho$ :
$$(1+(x-(1+rho)t)^2)rho-1=0$$



ADITION after the discussion in comments.



There is no difficulty to plot the figures that you saw in the document :
https://courses.physics.ucsd.edu/2011/Spring/physics221a/LECTURES/CH11_SHOCKS.pdf



For exemple, to plot the curves corresponding tu figure 11.1 :
$$x=(1+rho)tpmsqrt{frac{1}{rho}-1}$$
Plot the two branches with signs $+$ and $-$.



enter image description here



Inverse the axis if you want it in the standard position.






share|cite|improve this answer











$endgroup$



Your calculus is correct. You found the general solution :
$$rho=Fleft(x-(1+rho)tright)$$
Condition :
$$rho(x,0)=frac{1}{1+x^2}=Fleft(x-(1+rho)0right)=Fleft(xright)$$
The function $F$ is determined :
$$F(X)=frac{1}{1+X^2}$$
We put this function into the general solution where $X=x-(1+rho)t$
$$rho=frac{1}{1+(x-(1+rho)t)^2}$$
This is the solution on implicit form.



In order to obtain the explicit solution, solve the cubic equation for $rho$ :
$$(1+(x-(1+rho)t)^2)rho-1=0$$



ADITION after the discussion in comments.



There is no difficulty to plot the figures that you saw in the document :
https://courses.physics.ucsd.edu/2011/Spring/physics221a/LECTURES/CH11_SHOCKS.pdf



For exemple, to plot the curves corresponding tu figure 11.1 :
$$x=(1+rho)tpmsqrt{frac{1}{rho}-1}$$
Plot the two branches with signs $+$ and $-$.



enter image description here



Inverse the axis if you want it in the standard position.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Feb 1 at 16:33

























answered Jan 31 at 11:29









JJacquelinJJacquelin

45.4k21856




45.4k21856












  • $begingroup$
    Thamks for answering. I actually came to the same conclusion a few minutes ago. My next problem is when I'm computing the $delta = b^2 - 4ac$ of this equation, which sign is undetermined because, well, in (x,t) parameters are supposed to be both varying parameters and though $delta$ is not a scalar but a space of solutions.
    $endgroup$
    – Dash
    Jan 31 at 14:26












  • $begingroup$
    Apologies, I had a slightly different in mind indeed.. Still you are right, the formula cannot be written explicitly. Why I would like to have a explicit formula is to plot the solution for several time step to compare with what is shown in the book I mentionned. Another contributor kindly proposed a Wolfram code to do that but I wanted to do it on gnuplot or python. You know, the old way..
    $endgroup$
    – Dash
    Jan 31 at 15:08










  • $begingroup$
    There is no need for an explicit formula to plot $rho(x,t)$ as a function of $t$ for given $x$. Compute the formula of $t$ as a function of $rho$ which is an explicit equation. Plot $t$ as a function of $rho$ with $t$ on horizontal axis and $rho$ on vertical axis.
    $endgroup$
    – JJacquelin
    Jan 31 at 15:25












  • $begingroup$
    If I rewrite the equation as begin{equation} frac{1}{rho}-1=[x−(1+ρ)t]^2 end{equation} Then I cannot isolate t from ρ because of the square
    $endgroup$
    – Dash
    Jan 31 at 17:02












  • $begingroup$
    Here the advection velocity depends on $rho$ itself, which is the problem when I look for an explicit analytic solution. Perhaps I should quit looking for a beautiful formula, but do you have an idea of how they did in fig. 11 of the book to plot the solution ?
    $endgroup$
    – Dash
    Jan 31 at 18:55


















  • $begingroup$
    Thamks for answering. I actually came to the same conclusion a few minutes ago. My next problem is when I'm computing the $delta = b^2 - 4ac$ of this equation, which sign is undetermined because, well, in (x,t) parameters are supposed to be both varying parameters and though $delta$ is not a scalar but a space of solutions.
    $endgroup$
    – Dash
    Jan 31 at 14:26












  • $begingroup$
    Apologies, I had a slightly different in mind indeed.. Still you are right, the formula cannot be written explicitly. Why I would like to have a explicit formula is to plot the solution for several time step to compare with what is shown in the book I mentionned. Another contributor kindly proposed a Wolfram code to do that but I wanted to do it on gnuplot or python. You know, the old way..
    $endgroup$
    – Dash
    Jan 31 at 15:08










  • $begingroup$
    There is no need for an explicit formula to plot $rho(x,t)$ as a function of $t$ for given $x$. Compute the formula of $t$ as a function of $rho$ which is an explicit equation. Plot $t$ as a function of $rho$ with $t$ on horizontal axis and $rho$ on vertical axis.
    $endgroup$
    – JJacquelin
    Jan 31 at 15:25












  • $begingroup$
    If I rewrite the equation as begin{equation} frac{1}{rho}-1=[x−(1+ρ)t]^2 end{equation} Then I cannot isolate t from ρ because of the square
    $endgroup$
    – Dash
    Jan 31 at 17:02












  • $begingroup$
    Here the advection velocity depends on $rho$ itself, which is the problem when I look for an explicit analytic solution. Perhaps I should quit looking for a beautiful formula, but do you have an idea of how they did in fig. 11 of the book to plot the solution ?
    $endgroup$
    – Dash
    Jan 31 at 18:55
















$begingroup$
Thamks for answering. I actually came to the same conclusion a few minutes ago. My next problem is when I'm computing the $delta = b^2 - 4ac$ of this equation, which sign is undetermined because, well, in (x,t) parameters are supposed to be both varying parameters and though $delta$ is not a scalar but a space of solutions.
$endgroup$
– Dash
Jan 31 at 14:26






$begingroup$
Thamks for answering. I actually came to the same conclusion a few minutes ago. My next problem is when I'm computing the $delta = b^2 - 4ac$ of this equation, which sign is undetermined because, well, in (x,t) parameters are supposed to be both varying parameters and though $delta$ is not a scalar but a space of solutions.
$endgroup$
– Dash
Jan 31 at 14:26














$begingroup$
Apologies, I had a slightly different in mind indeed.. Still you are right, the formula cannot be written explicitly. Why I would like to have a explicit formula is to plot the solution for several time step to compare with what is shown in the book I mentionned. Another contributor kindly proposed a Wolfram code to do that but I wanted to do it on gnuplot or python. You know, the old way..
$endgroup$
– Dash
Jan 31 at 15:08




$begingroup$
Apologies, I had a slightly different in mind indeed.. Still you are right, the formula cannot be written explicitly. Why I would like to have a explicit formula is to plot the solution for several time step to compare with what is shown in the book I mentionned. Another contributor kindly proposed a Wolfram code to do that but I wanted to do it on gnuplot or python. You know, the old way..
$endgroup$
– Dash
Jan 31 at 15:08












$begingroup$
There is no need for an explicit formula to plot $rho(x,t)$ as a function of $t$ for given $x$. Compute the formula of $t$ as a function of $rho$ which is an explicit equation. Plot $t$ as a function of $rho$ with $t$ on horizontal axis and $rho$ on vertical axis.
$endgroup$
– JJacquelin
Jan 31 at 15:25






$begingroup$
There is no need for an explicit formula to plot $rho(x,t)$ as a function of $t$ for given $x$. Compute the formula of $t$ as a function of $rho$ which is an explicit equation. Plot $t$ as a function of $rho$ with $t$ on horizontal axis and $rho$ on vertical axis.
$endgroup$
– JJacquelin
Jan 31 at 15:25














$begingroup$
If I rewrite the equation as begin{equation} frac{1}{rho}-1=[x−(1+ρ)t]^2 end{equation} Then I cannot isolate t from ρ because of the square
$endgroup$
– Dash
Jan 31 at 17:02






$begingroup$
If I rewrite the equation as begin{equation} frac{1}{rho}-1=[x−(1+ρ)t]^2 end{equation} Then I cannot isolate t from ρ because of the square
$endgroup$
– Dash
Jan 31 at 17:02














$begingroup$
Here the advection velocity depends on $rho$ itself, which is the problem when I look for an explicit analytic solution. Perhaps I should quit looking for a beautiful formula, but do you have an idea of how they did in fig. 11 of the book to plot the solution ?
$endgroup$
– Dash
Jan 31 at 18:55




$begingroup$
Here the advection velocity depends on $rho$ itself, which is the problem when I look for an explicit analytic solution. Perhaps I should quit looking for a beautiful formula, but do you have an idea of how they did in fig. 11 of the book to plot the solution ?
$endgroup$
– Dash
Jan 31 at 18:55


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3094666%2fsolving-nonlinear-1d-advection-pde-with-moc%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

ts Property 'filter' does not exist on type '{}'

Notepad++ export/extract a list of installed plugins