查看给定图像中的输出。
问题:
首先,我要将方程标签 (2) 放在中心,其次,将方程 (2) 的部分用红色四舍五入到右侧。
平均能量损失
\documentclass[12pt]{article}
\usepackage[a4paper,top=0.6 in,bottom=0.6 in,left=0.6 in,right=0.6 in]{geometry}
\usepackage{amsmath}
\begin{document}
\large
\begin{flalign}
&\dfrac{\partial (u)}{\partial x} + \dfrac{\partial (v)}{\partial y}=0&& \\
&(u)\cdot\dfrac{\partial (u)}{\partial x} + (v)\cdot\dfrac{\partial (v)}{\partial y}= u_{e}\;\dfrac{d \,u_{e}}{d\, x}+\dfrac{\mu \left(1+\frac{1}{\gamma}\right)}{\rho}\,\frac{\partial^2 u}{\partial y^2}-\dfrac{\sigma B_{0}^{2}}{\rho}+ g\;\beta_{C}\;(C-C_{\infty})&&\\[2ex]
&-\frac{\mu\,\phi}{\rho k'}\,\left(u_{e}-u\right)+ g\;\beta_{T}\;(T-T_{\infty})\nonumber \\[2ex]
&(u)\;\dfrac{\partial (T)}{\partial x} + (v)\;\dfrac{\partial (T)}{\partial y}
=\left(\dfrac{k_{2}}{\rho\,c_{p}}\right)\,\dfrac{\partial^2 T}{\partial y^2}-\dfrac{1}{\rho\,c_{p}}\;\dfrac{\partial q_{r}}{\partial y}+\dfrac{Q_{0}}{\rho\,c_{p}}\left(T-T_{\infty}\right)+\dfrac{DK_{T}}{c_{s}\,c_{p}}\,\dfrac{\partial^2 C}{\partial\,y^2}&&\\[2ex]
&(u)\;\dfrac{\partial (C)}{\partial x} + (v)\;\dfrac{\partial (C)}{\partial y} =\dfrac{D_{T}}{T_{w}}\,\dfrac{\partial^2 T}{\partial y^2}+D_{B}\;\dfrac{\partial^2 C}{\partial y^2}&&
\end{flalign}
\end{document}
答案1
我认为没有必要使用flalign
。您只需aligned
对需要拆分的方程式使用 即可。
我删除了所有手动间距,以及所有\left
和\right
,但不是所有的不一致之处(有时会有\partial(C)
,有时会缺少括号)。
我还定义了\der
一些\pder
使输入更容易的命令。
\documentclass[12pt]{article}
\usepackage[a4paper,top=0.6 in,bottom=0.6 in,left=0.6 in,right=0.6 in]{geometry}
\usepackage{amsmath}
\NewDocumentCommand{\der}{omm}{%
\frac{d\IfValueT{#1}{^{#1}}#2}{d#3\IfValueT{#1}{^{#1}}}%
}
\NewDocumentCommand{\pder}{omm}{%
\frac{\partial\IfValueT{#1}{^{#1}}#2}{\partial#3\IfValueT{#1}{^{#1}}}%
}
\begin{document}
\begin{align}
&\pder{(u)}{x} + \pder{(v)}{y}=0 \\
&\begin{aligned}
(u)\pder{(u)}{x} + (v)\pder{(v)}{y}=
u_{e}\der{u_{e}}{x} &+\frac{\mu \bigl(1+\frac{1}{\gamma}\bigr)}{\rho}
\pder[2]{u}{y}-\frac{\sigma B_{0}^{2}}{\rho}+ g\beta_{C}(C-C_{\infty})\\
&-\frac{\mu\phi}{\rho k'}(u_{e}-u)+ g\beta_{T}(T-T_{\infty})
\end{aligned}\\[2ex]
&(u)\pder{(T)}{x} + (v)\pder{(T)}{y}=
\left(\frac{k_{2}}{\rho c_{p}}\right)\pder[2]{T}{y}-
\frac{1}{\rho c_{p}}\pder{q_{r}}{y}+\frac{Q_{0}}{\rho c_{p}}(T-T_{\infty})+
\frac{DK_{T}}{c_{s}c_{p}}\pder[2]{C}{y}\\[2ex]
&(u)\pder{(C)}{x} + (v)\pder{(C)}{y} =\frac{D_{T}}{T_{w}}\pder[2]{T}{y}+
D_{B}\pder[2]{C}{y}
\end{align}
\end{document}
答案2
您可以利用multlined
环境来包装一个好看的长方程式分隔符,并且它将被视为一个单独的块,以便标签居中。
\documentclass[12pt]{article}
\usepackage[a4paper,top=0.6 in,bottom=0.6 in,left=0.6 in,right=0.6 in]{geometry}
\usepackage{amsmath}
\usepackage{mathtools} % <- provides multlined
\begin{document}
\large
\begin{flalign}
&\dfrac{\partial (u)}{\partial x} + \dfrac{\partial (v)}{\partial y}=0&& \\
&\begin{multlined}
(u)\cdot\dfrac{\partial (u)}{\partial x} + (v)\cdot\dfrac{\partial (v)}{\partial y}= u_{e}\;\dfrac{d \,u_{e}}{d\, x}+\dfrac{\mu \left(1+\frac{1}{\gamma}\right)}{\rho}\,\frac{\partial^2 u}{\partial y^2}-\dfrac{\sigma B_{0}^{2}}{\rho}+ g\;\beta_{C}\;(C-C_{\infty})\\[2ex]
-\frac{\mu\,\phi}{\rho k'}\,\left(u_{e}-u\right)+ g\;\beta_{T}\;(T-T_{\infty})
\end{multlined}
\\[2ex]
&(u)\;\dfrac{\partial (T)}{\partial x} + (v)\;\dfrac{\partial (T)}{\partial y}
=\left(\dfrac{k_{2}}{\rho\,c_{p}}\right)\,\dfrac{\partial^2 T}{\partial y^2}-\dfrac{1}{\rho\,c_{p}}\;\dfrac{\partial q_{r}}{\partial y}+\dfrac{Q_{0}}{\rho\,c_{p}}\left(T-T_{\infty}\right)+\dfrac{DK_{T}}{c_{s}\,c_{p}}\,\dfrac{\partial^2 C}{\partial\,y^2}&&\\[2ex]
&(u)\;\dfrac{\partial (C)}{\partial x} + (v)\;\dfrac{\partial (C)}{\partial y} =\dfrac{D_{T}}{T_{w}}\,\dfrac{\partial^2 T}{\partial y^2}+D_{B}\;\dfrac{\partial^2 C}{\partial y^2}&&
\end{flalign}
\end{document}